| Function (anonymous_1) | |
|---|---|
| ✗ Was not called | module.exports = function (filePath) {··· // Replace slashes with backslashes for windows paths for correct require cache work. var isWinPath = /^\w{1}:/.test(filePath); filePath = isWinPath ? filePath.replace(/\//g, '\\') : filePath; dropRequireCache(require, filePath); return asyncRequire(filePath).then(function (json) { if (typeof json === 'object' && json !== null && !Array.isArray(json)) { var hasData = false; for (var i in json) { if (json.hasOwnProperty(i)) { hasData = true; break; } } if (hasData) { return json; } else { return vowFs.read(filePath, 'utf8').then(function (data) { return vm.runInThisContext(data); }); } } else { // Если был возвращен не объект, либо null, значит значение явно экспортировалось. return json; } }); }; |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | filePath = isWinPath ? filePath.replace(/\//g, '\\') : filePath; |
| ✗ Negative was not returned (: ...) | filePath = isWinPath ? filePath.replace(/\//g, '\\') : filePath; |
| Function (anonymous_2) | |
|---|---|
| ✗ Was not called | return asyncRequire(filePath).then(function (json) {··· if (typeof json === 'object' && json !== null && !Array.isArray(json)) { var hasData = false; for (var i in json) { if (json.hasOwnProperty(i)) { hasData = true; break; } } if (hasData) { return json; } else { return vowFs.read(filePath, 'utf8').then(function (data) { return vm.runInThisContext(data); }); } } else { // Если был возвращен не объект, либо null, значит значение явно экспортировалось. return json; } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (typeof json === 'object' && json !== null && !Array.isArray(json)) {··· var hasData = false; for (var i in json) { if (json.hasOwnProperty(i)) { hasData = true; break; } } if (hasData) { return json; } else { return vowFs.read(filePath, 'utf8').then(function (data) { return vm.runInThisContext(data); }); } } else { |
| ✗ Negative was not executed (else) | } else {··· // Если был возвращен не объект, либо null, значит значение явно экспортировалось. return json; } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (typeof json === 'object' && json !== null && !Array.isArray(json)) { |
| ✗ Was not returned | if (typeof json === 'object' && json !== null && !Array.isArray(json)) { |
| Branch LogicalExpression | |
| ✗ Was not returned | if (typeof json === 'object' && json !== null && !Array.isArray(json)) { |
| ✗ Was not returned | if (typeof json === 'object' && json !== null && !Array.isArray(json)) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (json.hasOwnProperty(i)) {··· hasData = true; break; } |
| ✗ Negative was not executed (else) | }··· } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (hasData) {··· return json; } else { |
| ✗ Negative was not executed (else) | } else {··· return vowFs.read(filePath, 'utf8').then(function (data) { return vm.runInThisContext(data); }); } |
| Function (anonymous_3) | |
|---|---|
| ✗ Was not called | return vowFs.read(filePath, 'utf8').then(function (data) {··· return vm.runInThisContext(data); }); |
| Function (anonymous_4) | |
|---|---|
| ✗ Was not called | module.exports = function (filename) {··· var promise = Vow.promise(); var doRequire = function () { try { var result = require(filename); promise.fulfill(result); delay = Math.max(1, delay / 2); } catch (e) { if (e.code === 'EMFILE') { delay++; setTimeout(doRequire, delay); } else { promise.reject(e); } } }; doRequire(); return promise; }; |
| Function (anonymous_5) | |
|---|---|
| ✗ Was not called | var doRequire = function () {··· try { var result = require(filename); promise.fulfill(result); delay = Math.max(1, delay / 2); } catch (e) { if (e.code === 'EMFILE') { delay++; setTimeout(doRequire, delay); } else { promise.reject(e); } } }; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (e.code === 'EMFILE') {··· delay++; setTimeout(doRequire, delay); } else { |
| ✗ Negative was not executed (else) | } else {··· promise.reject(e); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (process.env.ENB_FILE_LIMIT) {··· vowFs.options({ openFileLimit: parseInt(process.env.ENB_FILE_LIMIT, 10) }); } |
| ✓ Negative was executed (else) | }··· module.exports = vowFs; |
| Function (anonymous_6) | |
|---|---|
| ✗ Was not called | module.exports = function (requireFunc, filename) {··· var module = requireFunc.cache[filename]; if (module) { if (module.parent) { if (module.parent.children) { var moduleIndex = module.parent.children.indexOf(module); if (moduleIndex !== -1) { module.parent.children.splice(moduleIndex, 1); } } delete module.parent; } delete module.children; delete requireFunc.cache[filename]; } }; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (module) {··· if (module.parent) { if (module.parent.children) { var moduleIndex = module.parent.children.indexOf(module); if (moduleIndex !== -1) { module.parent.children.splice(moduleIndex, 1); } } delete module.parent; } delete module.children; delete requireFunc.cache[filename]; } |
| ✗ Negative was not executed (else) | }··· }; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (module.parent) {··· if (module.parent.children) { var moduleIndex = module.parent.children.indexOf(module); if (moduleIndex !== -1) { module.parent.children.splice(moduleIndex, 1); } } delete module.parent; } |
| ✗ Negative was not executed (else) | }··· delete module.children; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (module.parent.children) {··· var moduleIndex = module.parent.children.indexOf(module); if (moduleIndex !== -1) { module.parent.children.splice(moduleIndex, 1); } } |
| ✗ Negative was not executed (else) | }··· delete module.parent; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (moduleIndex !== -1) {··· module.parent.children.splice(moduleIndex, 1); } |
| ✗ Negative was not executed (else) | }··· } |
| Function (anonymous_8) | |
|---|---|
| ✗ Was not called | this._prepareFunc = function () {}; |
| Function (anonymous_9) | |
|---|---|
| ✗ Was not called | this._buildFunc = function () {··· throw new Error('You should declare build function using "build" method of BuildFlow.'); }; |
| Function (anonymous_10) | |
|---|---|
| ✗ Was not called | this._wrapFunc = function (data) {··· return data; }; |
| Function (anonymous_11) | |
|---|---|
| ✗ Was not called | this._saveFunc = function (filename, result) {··· return vowFs.write(filename, result, 'utf8'); }; |
| Function (anonymous_12) | |
|---|---|
| ✗ Was not called | this._cacheValidator = function () {··· return false; }; |
| Function (anonymous_13) | |
|---|---|
| ✗ Was not called | this._cacheSaver = function () {}; |
| Branch LogicalExpression | |
|---|---|
| ✓ Was returned | fieldName: fieldName || '_' + optionName, |
| ✓ Was returned | fieldName: fieldName || '_' + optionName, |
| Branch LogicalExpression | |
|---|---|
| ✓ Was returned | fieldName: fieldName || '_' + optionName |
| ✗ Was not returned | fieldName: fieldName || '_' + optionName |
| Function (anonymous_22) | |
|---|---|
| ✗ Was not called | optionAlias: function (optionName, aliasName) {··· return this._copyAnd(function (buildFlow) { buildFlow._optionAliases[aliasName] = optionName; }); }, |
| Function (anonymous_23) | |
|---|---|
| ✗ Was not called | return this._copyAnd(function (buildFlow) {··· buildFlow._optionAliases[aliasName] = optionName; }); |
| Function (anonymous_28) | |
|---|---|
| ✗ Was not called | unuseTarget: function (name) {··· return this._copyAnd(function (buildFlow) { buildFlow._removeUsage(name); }); }, |
| Function (anonymous_29) | |
|---|---|
| ✗ Was not called | return this._copyAnd(function (buildFlow) {··· buildFlow._removeUsage(name); }); |
| Function (anonymous_32) | |
|---|---|
| ✗ Was not called | unuseDirList: function () {··· return this._copyAnd(function (buildFlow) { buildFlow._removeUsage('dirsTarget'); }); }, |
| Function (anonymous_33) | |
|---|---|
| ✗ Was not called | return this._copyAnd(function (buildFlow) {··· buildFlow._removeUsage('dirsTarget'); }); |
| Function (anonymous_40) | |
|---|---|
| ✗ Was not called | useSourceResult: function (targetOptionName, defaultTargetName) {··· return this._copyAnd(function (buildFlow) { buildFlow._addUsage(new BuildFlowLinkToTargetResult(targetOptionName, defaultTargetName)); }); }, |
| Function (anonymous_41) | |
|---|---|
| ✗ Was not called | return this._copyAnd(function (buildFlow) {··· buildFlow._addUsage(new BuildFlowLinkToTargetResult(targetOptionName, defaultTargetName)); }); |
| Function (anonymous_42) | |
|---|---|
| ✗ Was not called | dependOn: function (targetOptionName, defaultTargetName) {··· return this._copyAnd(function (buildFlow) { buildFlow._addDep(new BuildFlowLinkToTargetNoResult(targetOptionName, defaultTargetName)); }); }, |
| Function (anonymous_43) | |
|---|---|
| ✗ Was not called | return this._copyAnd(function (buildFlow) {··· buildFlow._addDep(new BuildFlowLinkToTargetNoResult(targetOptionName, defaultTargetName)); }); |
| Function (anonymous_48) | |
|---|---|
| ✗ Was not called | prepare: function (func) {··· return this._copyAnd(function (buildFlow) { buildFlow._prepareFunc = func; }); }, |
| Function (anonymous_49) | |
|---|---|
| ✗ Was not called | return this._copyAnd(function (buildFlow) {··· buildFlow._prepareFunc = func; }); |
| Function (anonymous_50) | |
|---|---|
| ✗ Was not called | needRebuild: function (func) {··· return this._copyAnd(function (buildFlow) { buildFlow._cacheValidator = func; }); }, |
| Function (anonymous_51) | |
|---|---|
| ✗ Was not called | return this._copyAnd(function (buildFlow) {··· buildFlow._cacheValidator = func; }); |
| Function (anonymous_52) | |
|---|---|
| ✗ Was not called | saveCache: function (func) {··· return this._copyAnd(function (buildFlow) { buildFlow._cacheSaver = func; }); }, |
| Function (anonymous_53) | |
|---|---|
| ✗ Was not called | return this._copyAnd(function (buildFlow) {··· buildFlow._cacheSaver = func; }); |
| Function (anonymous_54) | |
|---|---|
| ✗ Was not called | wrapper: function (func) {··· return this._copyAnd(function (buildFlow) { buildFlow._wrapFunc = func; }); }, |
| Function (anonymous_55) | |
|---|---|
| ✗ Was not called | return this._copyAnd(function (buildFlow) {··· buildFlow._wrapFunc = func; }); |
| Function (anonymous_56) | |
|---|---|
| ✗ Was not called | saver: function (func) {··· return this._copyAnd(function (buildFlow) { buildFlow._saveFunc = func; }); }, |
| Function (anonymous_57) | |
|---|---|
| ✗ Was not called | return this._copyAnd(function (buildFlow) {··· buildFlow._saveFunc = func; }); |
| Function (anonymous_68) | |
|---|---|
| ✗ Was not called | Object.keys(optionAliases).forEach(function (optionName) {··· result._optionAliases[optionName] = optionAliases[optionName]; }); |
| Function (anonymous_71) | |
|---|---|
| ✗ Was not called | buildFlow._buildFunc = function () {··· var _this = this; return Vow.all(Array.prototype.map.call(arguments, function (arg) { if (typeof arg === 'string') { return vowFs.read(arg, 'utf8').then(function (data) { return wrapper ? wrapper.call(_this, arg, data) : data; }); } else if (Array.isArray(arg)) { return _this._joinFiles(arg, wrapper); } else { return ''; } })).then(function (res) { return res.join('\n'); }); }; |
| Function (anonymous_72) | |
|---|---|
| ✗ Was not called | return Vow.all(Array.prototype.map.call(arguments, function (arg) {··· if (typeof arg === 'string') { return vowFs.read(arg, 'utf8').then(function (data) { return wrapper ? wrapper.call(_this, arg, data) : data; }); } else if (Array.isArray(arg)) { return _this._joinFiles(arg, wrapper); } else { return ''; } })).then(function (res) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (typeof arg === 'string') {··· return vowFs.read(arg, 'utf8').then(function (data) { return wrapper ? wrapper.call(_this, arg, data) : data; }); } else if (Array.isArray(arg)) { |
| ✗ Negative was not executed (else) | } else if (Array.isArray(arg)) {··· return _this._joinFiles(arg, wrapper); } else { return ''; } |
| Function (anonymous_73) | |
|---|---|
| ✗ Was not called | return vowFs.read(arg, 'utf8').then(function (data) {··· return wrapper ? wrapper.call(_this, arg, data) : data; }); |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return wrapper ? wrapper.call(_this, arg, data) : data; |
| ✗ Negative was not returned (: ...) | return wrapper ? wrapper.call(_this, arg, data) : data; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (Array.isArray(arg)) {··· return _this._joinFiles(arg, wrapper); } else { |
| ✗ Negative was not executed (else) | } else {··· return ''; } |
| Function (anonymous_74) | |
|---|---|
| ✗ Was not called | })).then(function (res) {··· return res.join('\n'); }); |
| Function (anonymous_76) | |
|---|---|
| ✗ Was not called | return this.justJoinFiles(function (filename, data) {··· var fn = this.node.relativePath(filename); return '/* begin: ' + fn + ' *' + '/\n' + data + '\n/* end: ' + fn + ' *' + '/'; }); |
| Function (anonymous_77) | |
|---|---|
| ✗ Was not called | justJoinSources: function () {··· return this._copyAnd(function (buildFlow) { buildFlow._buildFunc = function () { var _this = this; return Vow.all(Array.prototype.map.call(arguments, function (arg) { if (typeof arg === 'string') { return arg; } else if (Array.isArray(arg)) { return _this._joinFiles(arg); } else { return ''; } })).then(function (res) { return res.join('\n'); }); }; }); }, |
| Function (anonymous_78) | |
|---|---|
| ✗ Was not called | return this._copyAnd(function (buildFlow) {··· buildFlow._buildFunc = function () { var _this = this; return Vow.all(Array.prototype.map.call(arguments, function (arg) { if (typeof arg === 'string') { return arg; } else if (Array.isArray(arg)) { return _this._joinFiles(arg); } else { return ''; } })).then(function (res) { return res.join('\n'); }); }; }); |
| Function (anonymous_79) | |
|---|---|
| ✗ Was not called | buildFlow._buildFunc = function () {··· var _this = this; return Vow.all(Array.prototype.map.call(arguments, function (arg) { if (typeof arg === 'string') { return arg; } else if (Array.isArray(arg)) { return _this._joinFiles(arg); } else { return ''; } })).then(function (res) { return res.join('\n'); }); }; |
| Function (anonymous_80) | |
|---|---|
| ✗ Was not called | return Vow.all(Array.prototype.map.call(arguments, function (arg) {··· if (typeof arg === 'string') { return arg; } else if (Array.isArray(arg)) { return _this._joinFiles(arg); } else { return ''; } })).then(function (res) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (typeof arg === 'string') {··· return arg; } else if (Array.isArray(arg)) { |
| ✗ Negative was not executed (else) | } else if (Array.isArray(arg)) {··· return _this._joinFiles(arg); } else { return ''; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (Array.isArray(arg)) {··· return _this._joinFiles(arg); } else { |
| ✗ Negative was not executed (else) | } else {··· return ''; } |
| Function (anonymous_81) | |
|---|---|
| ✗ Was not called | })).then(function (res) {··· return res.join('\n'); }); |
| Function (anonymous_85) | |
|---|---|
| ✗ Was not called | _addDep: function (dep) {··· return this._addToTargetLinks(this._dependencies, dep); }, |
| Branch IfStatement | |
|---|---|
| ✓ Positive was executed (if) | if (links[i].getTargetOptionName() === optionName) {··· links[i] = link; return this; } |
| ✓ Negative was executed (else) | }··· } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!name) {··· throw new Error('You should declare tech name using "name" method of BuildFlow.'); } |
| ✓ Negative was executed (else) | }··· if (!targetOptionName) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!targetOptionName) {··· throw new Error('You should declare tech target name using "target" method of BuildFlow.'); } |
| ✓ Negative was executed (else) | }··· var resultTechMethods = { |
| Function (anonymous_89) | |
|---|---|
| ✗ Was not called | configure: function () {··· var _this = this; var node = this.node; Object.keys(optionAliases).forEach(function (aliasName) { if (this._options.hasOwnProperty(aliasName)) { var optionName = optionAliases[aliasName]; this._options[optionName] = this._options[aliasName]; delete this._options[aliasName]; } }, this); this._optionFieldNames = {}; Object.keys(options).forEach(function (optName) { var option = options[optName]; _this[option.fieldName] = _this.getOption(optName, option.defaultValue); _this._optionFieldNames[optName] = option.fieldName; }); this._target = node.unmaskTargetName( this._preprocessTargetName(_this.getOption(targetOptionName, defaultTargetName)) ); requiredOptions.forEach(function (requiredOption) { _this.getRequiredOption(requiredOption); }); usages.forEach(function (usage) { usage.configureUsages(_this, node); }); this._buildResult = undefined; }, |
| Function (anonymous_90) | |
|---|---|
| ✗ Was not called | Object.keys(optionAliases).forEach(function (aliasName) {··· if (this._options.hasOwnProperty(aliasName)) { var optionName = optionAliases[aliasName]; this._options[optionName] = this._options[aliasName]; delete this._options[aliasName]; } }, this); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this._options.hasOwnProperty(aliasName)) {··· var optionName = optionAliases[aliasName]; this._options[optionName] = this._options[aliasName]; delete this._options[aliasName]; } |
| ✗ Negative was not executed (else) | }··· }, this); |
| Function (anonymous_91) | |
|---|---|
| ✗ Was not called | Object.keys(options).forEach(function (optName) {··· var option = options[optName]; _this[option.fieldName] = _this.getOption(optName, option.defaultValue); _this._optionFieldNames[optName] = option.fieldName; }); |
| Function (anonymous_92) | |
|---|---|
| ✗ Was not called | requiredOptions.forEach(function (requiredOption) {··· _this.getRequiredOption(requiredOption); }); |
| Function (anonymous_93) | |
|---|---|
| ✗ Was not called | usages.forEach(function (usage) {··· usage.configureUsages(_this, node); }); |
| Function (anonymous_94) | |
|---|---|
| ✗ Was not called | getName: function () {··· return name; }, |
| Function (anonymous_95) | |
|---|---|
| ✗ Was not called | getTargets: function () {··· return [this._target]; }, |
| Function (anonymous_96) | |
|---|---|
| ✗ Was not called | _requireSources: function () {··· var _this = this; var node = this.node; return Vow.all(usages.map(function (usage) { return usage.requireTarget(_this, node); })); }, |
| Function (anonymous_97) | |
|---|---|
| ✗ Was not called | return Vow.all(usages.map(function (usage) {··· return usage.requireTarget(_this, node); })); |
| Function (anonymous_98) | |
|---|---|
| ✗ Was not called | _isRebuildRequired: function () {··· var cache = this.node.getNodeCache(this._target); if (cacheValidator.call(this, cache)) { return true; } if (cache.needRebuildFile('target', this.node.resolvePath(this._target))) { return true; } for (var i = 0, l = usages.length; i < l; i++) { if (!usages[i].isCacheValid(this, this.node, cache)) { return true; } } return false; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (cacheValidator.call(this, cache)) {··· return true; } |
| ✗ Negative was not executed (else) | }··· if (cache.needRebuildFile('target', this.node.resolvePath(this._target))) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (cache.needRebuildFile('target', this.node.resolvePath(this._target))) {··· return true; } |
| ✗ Negative was not executed (else) | }··· for (var i = 0, l = usages.length; i < l; i++) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!usages[i].isCacheValid(this, this.node, cache)) {··· return true; } |
| ✗ Negative was not executed (else) | }··· } |
| Function (anonymous_99) | |
|---|---|
| ✗ Was not called | _saveCache: function () {··· var cache = this.node.getNodeCache(this._target); cache.cacheFileInfo('target', this.node.resolvePath(this._target)); for (var i = 0, l = usages.length; i < l; i++) { usages[i].saveCache(this, this.node, cache); } cacheSaver.call(this, cache); }, |
| Function (anonymous_100) | |
|---|---|
| ✗ Was not called | _getBuildResult: function () {··· return buildFunc.apply(this, arguments); }, |
| Function (anonymous_101) | |
|---|---|
| ✗ Was not called | _saveBuildResult: function () {··· return saveFunc.apply(this, arguments); }, |
| Function (anonymous_102) | |
|---|---|
| ✗ Was not called | _wrapBuildResult: function () {··· return wrapFunc.apply(this, arguments); }, |
| Function (anonymous_103) | |
|---|---|
| ✗ Was not called | _joinFiles: function (files, wrapper) {··· var _this = this; return Vow.all(files.map(function (fileInfo) { return vowFs.read(fileInfo.fullname, 'utf8').then(function (data) { return wrapper ? wrapper.call(_this, fileInfo.fullname, data) : data; }); })).then(function (results) { return results.join('\n'); }); }, |
| Function (anonymous_104) | |
|---|---|
| ✗ Was not called | return Vow.all(files.map(function (fileInfo) {··· return vowFs.read(fileInfo.fullname, 'utf8').then(function (data) { return wrapper ? wrapper.call(_this, fileInfo.fullname, data) : data; }); })).then(function (results) { |
| Function (anonymous_105) | |
|---|---|
| ✗ Was not called | return vowFs.read(fileInfo.fullname, 'utf8').then(function (data) {··· return wrapper ? wrapper.call(_this, fileInfo.fullname, data) : data; }); |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return wrapper ? wrapper.call(_this, fileInfo.fullname, data) : data; |
| ✗ Negative was not returned (: ...) | return wrapper ? wrapper.call(_this, fileInfo.fullname, data) : data; |
| Function (anonymous_106) | |
|---|---|
| ✗ Was not called | })).then(function (results) {··· return results.join('\n'); }); |
| Function (anonymous_107) | |
|---|---|
| ✗ Was not called | _joinFilesWithComments: function (files) {··· var node = this.node; return this._joinFiles(files, function (filename, data) { var fn = node.relativePath(filename); return '/* begin: ' + fn + ' *' + '/\n' + data + '\n/* end: ' + fn + ' *' + '/'; }); }, |
| Function (anonymous_108) | |
|---|---|
| ✗ Was not called | return this._joinFiles(files, function (filename, data) {··· var fn = node.relativePath(filename); return '/* begin: ' + fn + ' *' + '/\n' + data + '\n/* end: ' + fn + ' *' + '/'; }); |
| Function (anonymous_109) | |
|---|---|
| ✗ Was not called | _preprocessTargetName: function (targetName) {··· var _this = this; return targetName.replace(/{([^}]+)}/g, function (s, optName) { if (_this._optionFieldNames[optName]) { return _this[_this._optionFieldNames[optName]] || ''; } else { return _this.getOption(optName, ''); } }); }, |
| Function (anonymous_110) | |
|---|---|
| ✗ Was not called | return targetName.replace(/{([^}]+)}/g, function (s, optName) {··· if (_this._optionFieldNames[optName]) { return _this[_this._optionFieldNames[optName]] || ''; } else { return _this.getOption(optName, ''); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (_this._optionFieldNames[optName]) {··· return _this[_this._optionFieldNames[optName]] || ''; } else { |
| ✗ Negative was not executed (else) | } else {··· return _this.getOption(optName, ''); } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return _this[_this._optionFieldNames[optName]] || ''; |
| ✗ Was not returned | return _this[_this._optionFieldNames[optName]] || ''; |
| Function (anonymous_111) | |
|---|---|
| ✗ Was not called | setResult: function (value) {··· this._buildResult = value; }, |
| Function (anonymous_112) | |
|---|---|
| ✗ Was not called | _prepare: function () {··· return preparer.call(this); }, |
| Function (anonymous_113) | |
|---|---|
| ✗ Was not called | build: function () {··· var _this = this; var node = this.node; return Vow.when(_this._prepare()).then(function () { if (deprecationNotice) { node.getLogger().logTechIsDeprecated( _this._target, name, deprecationNotice.thisPackage, deprecationNotice.newTech || (deprecationNotice.newPackage ? name : ''), deprecationNotice.newPackage, deprecationNotice.desc ); } return _this._requireSources().then(function (results) { if (_this._isRebuildRequired()) { return Vow.when(_this._getBuildResult.apply(_this, results)).then(function (data) { return Vow.when(_this._wrapBuildResult(data)).then(function (wrappedData) { return Vow.when( _this._saveBuildResult(_this.node.resolvePath(_this._target), wrappedData) ).then(function () { _this._saveCache(); node.resolveTarget(_this._target, _this._buildResult); }); }); }); } else { node.isValidTarget(_this._target); node.resolveTarget(_this._target, _this._buildResult); return null; } }); }); } |
| Function (anonymous_114) | |
|---|---|
| ✗ Was not called | return Vow.when(_this._prepare()).then(function () {··· if (deprecationNotice) { node.getLogger().logTechIsDeprecated( _this._target, name, deprecationNotice.thisPackage, deprecationNotice.newTech || (deprecationNotice.newPackage ? name : ''), deprecationNotice.newPackage, deprecationNotice.desc ); } return _this._requireSources().then(function (results) { if (_this._isRebuildRequired()) { return Vow.when(_this._getBuildResult.apply(_this, results)).then(function (data) { return Vow.when(_this._wrapBuildResult(data)).then(function (wrappedData) { return Vow.when( _this._saveBuildResult(_this.node.resolvePath(_this._target), wrappedData) ).then(function () { _this._saveCache(); node.resolveTarget(_this._target, _this._buildResult); }); }); }); } else { node.isValidTarget(_this._target); node.resolveTarget(_this._target, _this._buildResult); return null; } }); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (deprecationNotice) {··· node.getLogger().logTechIsDeprecated( _this._target, name, deprecationNotice.thisPackage, deprecationNotice.newTech || (deprecationNotice.newPackage ? name : ''), deprecationNotice.newPackage, deprecationNotice.desc ); } |
| ✗ Negative was not executed (else) | }··· return _this._requireSources().then(function (results) { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (deprecationNotice.newPackage ? name : ''), |
| ✗ Was not returned | deprecationNotice.newTech || |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | (deprecationNotice.newPackage ? name : ''), |
| ✗ Negative was not returned (: ...) | (deprecationNotice.newPackage ? name : ''), |
| Function (anonymous_115) | |
|---|---|
| ✗ Was not called | return _this._requireSources().then(function (results) {··· if (_this._isRebuildRequired()) { return Vow.when(_this._getBuildResult.apply(_this, results)).then(function (data) { return Vow.when(_this._wrapBuildResult(data)).then(function (wrappedData) { return Vow.when( _this._saveBuildResult(_this.node.resolvePath(_this._target), wrappedData) ).then(function () { _this._saveCache(); node.resolveTarget(_this._target, _this._buildResult); }); }); }); } else { node.isValidTarget(_this._target); node.resolveTarget(_this._target, _this._buildResult); return null; } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (_this._isRebuildRequired()) {··· return Vow.when(_this._getBuildResult.apply(_this, results)).then(function (data) { return Vow.when(_this._wrapBuildResult(data)).then(function (wrappedData) { return Vow.when( _this._saveBuildResult(_this.node.resolvePath(_this._target), wrappedData) ).then(function () { _this._saveCache(); node.resolveTarget(_this._target, _this._buildResult); }); }); }); } else { |
| ✗ Negative was not executed (else) | } else {··· node.isValidTarget(_this._target); node.resolveTarget(_this._target, _this._buildResult); return null; } |
| Function (anonymous_116) | |
|---|---|
| ✗ Was not called | return Vow.when(_this._getBuildResult.apply(_this, results)).then(function (data) {··· return Vow.when(_this._wrapBuildResult(data)).then(function (wrappedData) { return Vow.when( _this._saveBuildResult(_this.node.resolvePath(_this._target), wrappedData) ).then(function () { _this._saveCache(); node.resolveTarget(_this._target, _this._buildResult); }); }); }); |
| Function (anonymous_117) | |
|---|---|
| ✗ Was not called | return Vow.when(_this._wrapBuildResult(data)).then(function (wrappedData) {··· return Vow.when( _this._saveBuildResult(_this.node.resolvePath(_this._target), wrappedData) ).then(function () { _this._saveCache(); node.resolveTarget(_this._target, _this._buildResult); }); }); |
| Function (anonymous_118) | |
|---|---|
| ✗ Was not called | ).then(function () {··· _this._saveCache(); node.resolveTarget(_this._target, _this._buildResult); }); |
| Function (anonymous_123) | |
|---|---|
| ✗ Was not called | configureUsages: function (tech, node) {··· tech[this._fieldName] = node.unmaskTargetName( tech._preprocessTargetName(tech.getOption(this._targetOptionName, this._defaultTargetName)) ); }, |
| Function (anonymous_124) | |
|---|---|
| ✗ Was not called | isCacheValid: function (tech, node, cache) {··· var targetName = tech[this._fieldName]; var targetPath = node.resolvePath(targetName); return !cache.needRebuildFile('target:' + targetName, targetPath); }, |
| Function (anonymous_125) | |
|---|---|
| ✗ Was not called | saveCache: function (tech, node, cache) {··· var targetName = tech[this._fieldName]; var targetPath = node.resolvePath(targetName); cache.cacheFileInfo('target:' + targetName, targetPath); }, |
| Function (anonymous_126) | |
|---|---|
| ✗ Was not called | requireTarget: function (tech, node) {··· var _this = this; var processTargetResult = this._processTargetResult; return node.requireSources([tech[this._fieldName]]).spread(function (result) { return processTargetResult.call(_this, tech, node, result); }); }, |
| Function (anonymous_127) | |
|---|---|
| ✗ Was not called | return node.requireSources([tech[this._fieldName]]).spread(function (result) {··· return processTargetResult.call(_this, tech, node, result); }); |
| Function (anonymous_128) | |
|---|---|
| ✗ Was not called | getFieldName: function () {··· return this._fieldName; }, |
| Function (anonymous_129) | |
|---|---|
| ✗ Was not called | _processTargetResult: function (tech, node, result) {··· return result; } |
| Function (anonymous_130) | |
|---|---|
| ✗ Was not called | _processTargetResult: function () {··· return ''; } |
| Function (anonymous_131) | |
|---|---|
| ✗ Was not called | _processTargetResult: function (tech, node) {··· return node.resolvePath(tech[this._fieldName]); } |
| Function (anonymous_132) | |
|---|---|
| ✗ Was not called | _processTargetResult: function (tech, node) {··· return vowFs.read(node.resolvePath(tech[this._fieldName]), 'utf8'); } |
| Function (anonymous_135) | |
|---|---|
| ✗ Was not called | isCacheValid: function (tech, node, cache) {··· var targetName = tech[this._fieldName]; return !cache.needRebuildFileList('target:' + targetName, tech[this._listName]); }, |
| Function (anonymous_136) | |
|---|---|
| ✗ Was not called | saveCache: function (tech, node, cache) {··· var targetName = tech[this._fieldName]; return cache.cacheFileList('target:' + targetName, tech[this._listName]); }, |
| Function (anonymous_137) | |
|---|---|
| ✗ Was not called | _processTargetResult: function (tech, node, result) {··· var suffixes = tech.getOption(this._suffixesOptionName) || this._defaultSuffixes; suffixes = (Array.isArray(suffixes) ? suffixes : [suffixes]); tech[this._listName] = result.getBySuffix(suffixes); return tech[this._listName]; } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var suffixes = tech.getOption(this._suffixesOptionName) || this._defaultSuffixes; |
| ✗ Was not returned | var suffixes = tech.getOption(this._suffixesOptionName) || this._defaultSuffixes; |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | suffixes = (Array.isArray(suffixes) ? suffixes : [suffixes]); |
| ✗ Negative was not returned (: ...) | suffixes = (Array.isArray(suffixes) ? suffixes : [suffixes]); |
| Function (anonymous_140) | |
|---|---|
| ✗ Was not called | isCacheValid: function (tech, node, cache) {··· var targetName = tech[this._fieldName]; var files = [].concat.apply([], tech[this._listName].map(function (dir) { return dir.files; })); return !cache.needRebuildFileList('target:' + targetName, files); }, |
| Function (anonymous_141) | |
|---|---|
| ✗ Was not called | var files = [].concat.apply([], tech[this._listName].map(function (dir) {··· return dir.files; })); |
| Function (anonymous_142) | |
|---|---|
| ✗ Was not called | saveCache: function (tech, node, cache) {··· var targetName = tech[this._fieldName]; var files = [].concat.apply([], tech[this._listName].map(function (dir) { return dir.files; })); return cache.cacheFileList('target:' + targetName, files); }, |
| Function (anonymous_143) | |
|---|---|
| ✗ Was not called | var files = [].concat.apply([], tech[this._listName].map(function (dir) {··· return dir.files; })); |
| Function (anonymous_144) | |
|---|---|
| ✗ Was not called | _processTargetResult: function (tech, node, result) {··· var suffixes = tech.getOption(this._suffixesOptionName) || this._suffixes; suffixes = Array.isArray(suffixes) ? suffixes : [suffixes]; tech[this._listName] = result.getBySuffix(suffixes); return tech[this._listName]; } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var suffixes = tech.getOption(this._suffixesOptionName) || this._suffixes; |
| ✗ Was not returned | var suffixes = tech.getOption(this._suffixesOptionName) || this._suffixes; |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | suffixes = Array.isArray(suffixes) ? suffixes : [suffixes]; |
| ✗ Negative was not returned (: ...) | suffixes = Array.isArray(suffixes) ? suffixes : [suffixes]; |
| Branch LogicalExpression | |
|---|---|
| ✓ Was returned | this._defaultTargetNames = defaultTargetNames || []; |
| ✓ Was returned | this._defaultTargetNames = defaultTargetNames || []; |
| Function (anonymous_147) | |
|---|---|
| ✗ Was not called | configureUsages: function (tech, node) {··· var _this = this; var links = []; var targetNames = []; var targetOptionName = this._targetOptionName; var i = 0; tech.getOption(this._targetOptionName, this._defaultTargetNames).forEach(function (targetName) { var link = new _this._linkClass(targetOptionName + '[' + i + ']', targetName); link.configureUsages(tech, node); targetNames.push(tech[link.getFieldName()]); links.push(link); i++; }); tech[this._fieldName] = targetNames; tech[this._usagesFieldName] = links; }, |
| Function (anonymous_148) | |
|---|---|
| ✗ Was not called | tech.getOption(this._targetOptionName, this._defaultTargetNames).forEach(function (targetName) {··· var link = new _this._linkClass(targetOptionName + '[' + i + ']', targetName); link.configureUsages(tech, node); targetNames.push(tech[link.getFieldName()]); links.push(link); i++; }); |
| Function (anonymous_149) | |
|---|---|
| ✗ Was not called | isCacheValid: function (tech, node, cache) {··· var links = tech[this._usagesFieldName]; for (var i = 0, l = links.length; i < l; i++) { if (!links[i].isCacheValid(tech, node, cache)) { return false; } } return true; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!links[i].isCacheValid(tech, node, cache)) {··· return false; } |
| ✗ Negative was not executed (else) | }··· } |
| Function (anonymous_150) | |
|---|---|
| ✗ Was not called | saveCache: function (tech, node, cache) {··· tech[this._usagesFieldName].forEach(function (link) { link.saveCache(tech, node, cache); }); }, |
| Function (anonymous_151) | |
|---|---|
| ✗ Was not called | tech[this._usagesFieldName].forEach(function (link) {··· link.saveCache(tech, node, cache); }); |
| Function (anonymous_152) | |
|---|---|
| ✗ Was not called | requireTarget: function (tech, node) {··· return Vow.all(tech[this._usagesFieldName].map(function (link) { return link.requireTarget(tech, node); })); } |
| Function (anonymous_153) | |
|---|---|
| ✗ Was not called | return Vow.all(tech[this._usagesFieldName].map(function (link) {··· return link.requireTarget(tech, node); })); |
| Function (anonymous_155) | |
|---|---|
| ✗ Was not called | __constructor: function (options) {··· this._options = options || {}; }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | this._options = options || {}; |
| ✗ Was not returned | this._options = options || {}; |
| Function (anonymous_156) | |
|---|---|
| ✗ Was not called | init: function (node) {··· this.node = node; this.configure(); }, |
| Function (anonymous_157) | |
|---|---|
| ✗ Was not called | configure: function () {}, |
| Function (anonymous_158) | |
|---|---|
| ✗ Was not called | getOption: function (key, defaultValue) {··· return this._options.hasOwnProperty(key) ? this._options[key] : defaultValue; }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return this._options.hasOwnProperty(key) ? this._options[key] : defaultValue; |
| ✗ Negative was not returned (: ...) | return this._options.hasOwnProperty(key) ? this._options[key] : defaultValue; |
| Function (anonymous_159) | |
|---|---|
| ✗ Was not called | getRequiredOption: function (key) {··· if (!this._options.hasOwnProperty(key)) { throw Error('Option "' + key + '" is required for technology "' + this.getName() + '".'); } return this._options[key]; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!this._options.hasOwnProperty(key)) {··· throw Error('Option "' + key + '" is required for technology "' + this.getName() + '".'); } |
| ✗ Negative was not executed (else) | }··· return this._options[key]; |
| Function (anonymous_160) | |
|---|---|
| ✗ Was not called | build: function () {··· throw new Error('You are required to override build method of BaseTech.'); }, |
| Function (anonymous_161) | |
|---|---|
| ✗ Was not called | getName: function () {··· throw new Error('You are required to override getName method of BaseTech.'); }, |
| Function (anonymous_162) | |
|---|---|
| ✗ Was not called | getTargets: function () {··· throw new Error('You are required to override getTargets method of BaseTech.'); }, |
| Function (anonymous_163) | |
|---|---|
| ✗ Was not called | clean: function () {··· var _this = this; return Vow.all(this.getTargets().map(function (target) { _this.node.cleanTargetFile(target); })); } |
| Function (anonymous_164) | |
|---|---|
| ✗ Was not called | return Vow.all(this.getTargets().map(function (target) {··· _this.node.cleanTargetFile(target); })); |
| Function (anonymous_165) | |
|---|---|
| ✗ Was not called | merge: function (depsToMerge) {··· depsToMerge = [].concat(depsToMerge); var startingDep = depsToMerge.shift(); var index = buildDepsIndex(startingDep); var result = [].concat(startingDep); var currentDep; var dep; var key; while (!!(currentDep = depsToMerge.shift())) { for (var i = 0, l = currentDep.length; i < l; i++) { dep = currentDep[i]; key = depKey(dep); if (!index[key]) { result.push(dep); index[key] = true; } } } return result; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!index[key]) {··· result.push(dep); index[key] = true; } |
| ✗ Negative was not executed (else) | }··· } |
| Function (anonymous_166) | |
|---|---|
| ✗ Was not called | subtract: function (from, what) {··· var whatIndex = buildDepsIndex(what); return from.filter(function (dep) { return !whatIndex[depKey(dep)]; }); }, |
| Function (anonymous_167) | |
|---|---|
| ✗ Was not called | return from.filter(function (dep) {··· return !whatIndex[depKey(dep)]; }); |
| Function (anonymous_168) | |
|---|---|
| ✗ Was not called | fromBemdecl: function (bemdecl) {··· if (bemdecl.blocks) { var res = []; bemdecl.blocks.forEach(function (block) { res.push({ block: block.name }); if (block.mods) { block.mods.forEach(function (mod) { if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, mod: mod.name, val: val.name}); }); } }); } if (block.elems) { block.elems.forEach(function (elem) { res.push({ block: block.name, elem: elem.name }); if (elem.mods) { elem.mods.forEach(function (mod) { if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, elem: elem.name, mod: mod.name, val: val.name }); }); } }); } }); } }); return res; } else { return this.flattenDeps(bemdecl.deps || []); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (bemdecl.blocks) {··· var res = []; bemdecl.blocks.forEach(function (block) { res.push({ block: block.name }); if (block.mods) { block.mods.forEach(function (mod) { if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, mod: mod.name, val: val.name}); }); } }); } if (block.elems) { block.elems.forEach(function (elem) { res.push({ block: block.name, elem: elem.name }); if (elem.mods) { elem.mods.forEach(function (mod) { if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, elem: elem.name, mod: mod.name, val: val.name }); }); } }); } }); } }); return res; } else { |
| ✗ Negative was not executed (else) | } else {··· return this.flattenDeps(bemdecl.deps || []); } |
| Function (anonymous_169) | |
|---|---|
| ✗ Was not called | bemdecl.blocks.forEach(function (block) {··· res.push({ block: block.name }); if (block.mods) { block.mods.forEach(function (mod) { if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, mod: mod.name, val: val.name}); }); } }); } if (block.elems) { block.elems.forEach(function (elem) { res.push({ block: block.name, elem: elem.name }); if (elem.mods) { elem.mods.forEach(function (mod) { if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, elem: elem.name, mod: mod.name, val: val.name }); }); } }); } }); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (block.mods) {··· block.mods.forEach(function (mod) { if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, mod: mod.name, val: val.name}); }); } }); } |
| ✗ Negative was not executed (else) | }··· if (block.elems) { |
| Function (anonymous_170) | |
|---|---|
| ✗ Was not called | block.mods.forEach(function (mod) {··· if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, mod: mod.name, val: val.name}); }); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (mod.vals) {··· mod.vals.forEach(function (val) { res.push({ block: block.name, mod: mod.name, val: val.name}); }); } |
| ✗ Negative was not executed (else) | }··· }); |
| Function (anonymous_171) | |
|---|---|
| ✗ Was not called | mod.vals.forEach(function (val) {··· res.push({ block: block.name, mod: mod.name, val: val.name}); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (block.elems) {··· block.elems.forEach(function (elem) { res.push({ block: block.name, elem: elem.name }); if (elem.mods) { elem.mods.forEach(function (mod) { if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, elem: elem.name, mod: mod.name, val: val.name }); }); } }); } }); } |
| ✗ Negative was not executed (else) | }··· }); |
| Function (anonymous_172) | |
|---|---|
| ✗ Was not called | block.elems.forEach(function (elem) {··· res.push({ block: block.name, elem: elem.name }); if (elem.mods) { elem.mods.forEach(function (mod) { if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, elem: elem.name, mod: mod.name, val: val.name }); }); } }); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (elem.mods) {··· elem.mods.forEach(function (mod) { if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, elem: elem.name, mod: mod.name, val: val.name }); }); } }); } |
| ✗ Negative was not executed (else) | }··· }); |
| Function (anonymous_173) | |
|---|---|
| ✗ Was not called | elem.mods.forEach(function (mod) {··· if (mod.vals) { mod.vals.forEach(function (val) { res.push({ block: block.name, elem: elem.name, mod: mod.name, val: val.name }); }); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (mod.vals) {··· mod.vals.forEach(function (val) { res.push({ block: block.name, elem: elem.name, mod: mod.name, val: val.name }); }); } |
| ✗ Negative was not executed (else) | }··· }); |
| Function (anonymous_174) | |
|---|---|
| ✗ Was not called | mod.vals.forEach(function (val) {··· res.push({ block: block.name, elem: elem.name, mod: mod.name, val: val.name }); }); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return this.flattenDeps(bemdecl.deps || []); |
| ✗ Was not returned | return this.flattenDeps(bemdecl.deps || []); |
| Function (anonymous_175) | |
|---|---|
| ✗ Was not called | toBemdecl: function (bemdecl) {··· if (bemdecl.deps) { var res = []; bemdecl.deps.forEach(function (dep) { var item = { block: dep.block }; if (dep.elem) { if (dep.mod) { if (dep.val) { item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod, vals: [ { name: dep.val } ] }] }]; } else { item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod }] }]; } } else { item.elems = [{ elem: dep.elem }]; } } else { if (dep.mod) { if (dep.val) { item.mods = [{ name: dep.mod, vals: [ { name: dep.val } ] }]; } else { item.mods = [{ name: dep.mod }]; } } } res.push(item); }); return res; } else { return bemdecl.blocks || []; } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (bemdecl.deps) {··· var res = []; bemdecl.deps.forEach(function (dep) { var item = { block: dep.block }; if (dep.elem) { if (dep.mod) { if (dep.val) { item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod, vals: [ { name: dep.val } ] }] }]; } else { item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod }] }]; } } else { item.elems = [{ elem: dep.elem }]; } } else { if (dep.mod) { if (dep.val) { item.mods = [{ name: dep.mod, vals: [ { name: dep.val } ] }]; } else { item.mods = [{ name: dep.mod }]; } } } res.push(item); }); return res; } else { |
| ✗ Negative was not executed (else) | } else {··· return bemdecl.blocks || []; } |
| Function (anonymous_176) | |
|---|---|
| ✗ Was not called | bemdecl.deps.forEach(function (dep) {··· var item = { block: dep.block }; if (dep.elem) { if (dep.mod) { if (dep.val) { item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod, vals: [ { name: dep.val } ] }] }]; } else { item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod }] }]; } } else { item.elems = [{ elem: dep.elem }]; } } else { if (dep.mod) { if (dep.val) { item.mods = [{ name: dep.mod, vals: [ { name: dep.val } ] }]; } else { item.mods = [{ name: dep.mod }]; } } } res.push(item); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.elem) {··· if (dep.mod) { if (dep.val) { item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod, vals: [ { name: dep.val } ] }] }]; } else { item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod }] }]; } } else { item.elems = [{ elem: dep.elem }]; } } else { |
| ✗ Negative was not executed (else) | } else {··· if (dep.mod) { if (dep.val) { item.mods = [{ name: dep.mod, vals: [ { name: dep.val } ] }]; } else { item.mods = [{ name: dep.mod }]; } } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.mod) {··· if (dep.val) { item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod, vals: [ { name: dep.val } ] }] }]; } else { item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod }] }]; } } else { |
| ✗ Negative was not executed (else) | } else {··· item.elems = [{ elem: dep.elem }]; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.val) {··· item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod, vals: [ { name: dep.val } ] }] }]; } else { |
| ✗ Negative was not executed (else) | } else {··· item.elems = [{ elem: dep.elem, mods: [{ name: dep.mod }] }]; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.mod) {··· if (dep.val) { item.mods = [{ name: dep.mod, vals: [ { name: dep.val } ] }]; } else { item.mods = [{ name: dep.mod }]; } } |
| ✗ Negative was not executed (else) | }··· } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.val) {··· item.mods = [{ name: dep.mod, vals: [ { name: dep.val } ] }]; } else { |
| ✗ Negative was not executed (else) | } else {··· item.mods = [{ name: dep.mod }]; } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return bemdecl.blocks || []; |
| ✗ Was not returned | return bemdecl.blocks || []; |
| Function (anonymous_177) | |
|---|---|
| ✗ Was not called | flattenDep: function (dep, blockName) {··· if (typeof dep === 'string') { return [{ block: dep }]; } var res = []; if (!dep.block) { dep.block = blockName; } if (dep.elem) { if (dep.mods) { Object.keys(dep.mods).forEach(function (modName) { var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, elem: dep.elem, mod: modName, val: modVal }; })); }); } else if (dep.mod) { if (dep.val) { res.push({ block: dep.block, elem: dep.elem, mod: dep.mod, val: dep.val }); } else { res.push({ block: dep.block, elem: dep.elem, mod: dep.mod }); } } else { res.push({ block: dep.block, elem: dep.elem }); } } else if (dep.mods || dep.elems) { Object.keys(dep.mods || {}).forEach(function (modName) { var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, mod: modName, val: modVal }; })); }); if (dep.elems) { res.push({ block: dep.block }); var elems = dep.elems || []; if (!Array.isArray(elems)) { elems = [elems]; } elems.forEach(function (elem) { if (typeof elem === 'object') { res.push({ block: dep.block, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, elem: elem.elem, mod: modName, val: modVal }; })); }); } else { res.push({ block: dep.block, elem: elem }); } }); } } else if (dep.mod) { if (dep.val) { res.push({ block: dep.block, mod: dep.mod, val: dep.val }); } else { res.push({ block: dep.block, mod: dep.mod }); } } else { res = [{ block: dep.block }]; } if (dep.tech) { res.forEach(function (resDep) { resDep.tech = dep.tech; }); } return res; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (typeof dep === 'string') {··· return [{ block: dep }]; } |
| ✗ Negative was not executed (else) | }··· var res = []; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!dep.block) {··· dep.block = blockName; } |
| ✗ Negative was not executed (else) | }··· if (dep.elem) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.elem) {··· if (dep.mods) { Object.keys(dep.mods).forEach(function (modName) { var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, elem: dep.elem, mod: modName, val: modVal }; })); }); } else if (dep.mod) { if (dep.val) { res.push({ block: dep.block, elem: dep.elem, mod: dep.mod, val: dep.val }); } else { res.push({ block: dep.block, elem: dep.elem, mod: dep.mod }); } } else { res.push({ block: dep.block, elem: dep.elem }); } } else if (dep.mods || dep.elems) { |
| ✗ Negative was not executed (else) | } else if (dep.mods || dep.elems) {··· Object.keys(dep.mods || {}).forEach(function (modName) { var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, mod: modName, val: modVal }; })); }); if (dep.elems) { res.push({ block: dep.block }); var elems = dep.elems || []; if (!Array.isArray(elems)) { elems = [elems]; } elems.forEach(function (elem) { if (typeof elem === 'object') { res.push({ block: dep.block, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, elem: elem.elem, mod: modName, val: modVal }; })); }); } else { res.push({ block: dep.block, elem: elem }); } }); } } else if (dep.mod) { if (dep.val) { res.push({ block: dep.block, mod: dep.mod, val: dep.val }); } else { res.push({ block: dep.block, mod: dep.mod }); } } else { res = [{ block: dep.block }]; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.mods) {··· Object.keys(dep.mods).forEach(function (modName) { var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, elem: dep.elem, mod: modName, val: modVal }; })); }); } else if (dep.mod) { |
| ✗ Negative was not executed (else) | } else if (dep.mod) {··· if (dep.val) { res.push({ block: dep.block, elem: dep.elem, mod: dep.mod, val: dep.val }); } else { res.push({ block: dep.block, elem: dep.elem, mod: dep.mod }); } } else { res.push({ block: dep.block, elem: dep.elem }); } |
| Function (anonymous_178) | |
|---|---|
| ✗ Was not called | Object.keys(dep.mods).forEach(function (modName) {··· var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, elem: dep.elem, mod: modName, val: modVal }; })); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!Array.isArray(modVals)) {··· modVals = [modVals]; } |
| ✗ Negative was not executed (else) | }··· res = res.concat(modVals.map(function (modVal) { |
| Function (anonymous_179) | |
|---|---|
| ✗ Was not called | res = res.concat(modVals.map(function (modVal) {··· return { block: dep.block, elem: dep.elem, mod: modName, val: modVal }; })); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (dep.mod) {··· if (dep.val) { res.push({ block: dep.block, elem: dep.elem, mod: dep.mod, val: dep.val }); } else { res.push({ block: dep.block, elem: dep.elem, mod: dep.mod }); } } else { |
| ✗ Negative was not executed (else) | } else {··· res.push({ block: dep.block, elem: dep.elem }); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.val) {··· res.push({ block: dep.block, elem: dep.elem, mod: dep.mod, val: dep.val }); } else { |
| ✗ Negative was not executed (else) | } else {··· res.push({ block: dep.block, elem: dep.elem, mod: dep.mod }); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (dep.mods || dep.elems) {··· Object.keys(dep.mods || {}).forEach(function (modName) { var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, mod: modName, val: modVal }; })); }); if (dep.elems) { res.push({ block: dep.block }); var elems = dep.elems || []; if (!Array.isArray(elems)) { elems = [elems]; } elems.forEach(function (elem) { if (typeof elem === 'object') { res.push({ block: dep.block, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, elem: elem.elem, mod: modName, val: modVal }; })); }); } else { res.push({ block: dep.block, elem: elem }); } }); } } else if (dep.mod) { |
| ✗ Negative was not executed (else) | } else if (dep.mod) {··· if (dep.val) { res.push({ block: dep.block, mod: dep.mod, val: dep.val }); } else { res.push({ block: dep.block, mod: dep.mod }); } } else { res = [{ block: dep.block }]; } |
| Branch LogicalExpression | |
| ✗ Was not returned | } else if (dep.mods || dep.elems) { |
| ✗ Was not returned | } else if (dep.mods || dep.elems) { |
| Function (anonymous_180) | |
|---|---|
| ✗ Was not called | Object.keys(dep.mods || {}).forEach(function (modName) {··· var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, mod: modName, val: modVal }; })); }); |
| Branch LogicalExpression | |
| ✗ Was not returned | Object.keys(dep.mods || {}).forEach(function (modName) { |
| ✗ Was not returned | Object.keys(dep.mods || {}).forEach(function (modName) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!Array.isArray(modVals)) {··· modVals = [modVals]; } |
| ✗ Negative was not executed (else) | }··· res = res.concat(modVals.map(function (modVal) { |
| Function (anonymous_181) | |
|---|---|
| ✗ Was not called | res = res.concat(modVals.map(function (modVal) {··· return { block: dep.block, mod: modName, val: modVal }; })); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.elems) {··· res.push({ block: dep.block }); var elems = dep.elems || []; if (!Array.isArray(elems)) { elems = [elems]; } elems.forEach(function (elem) { if (typeof elem === 'object') { res.push({ block: dep.block, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, elem: elem.elem, mod: modName, val: modVal }; })); }); } else { res.push({ block: dep.block, elem: elem }); } }); } |
| ✗ Negative was not executed (else) | }··· } else if (dep.mod) { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var elems = dep.elems || []; |
| ✗ Was not returned | var elems = dep.elems || []; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!Array.isArray(elems)) {··· elems = [elems]; } |
| ✗ Negative was not executed (else) | }··· elems.forEach(function (elem) { |
| Function (anonymous_182) | |
|---|---|
| ✗ Was not called | elems.forEach(function (elem) {··· if (typeof elem === 'object') { res.push({ block: dep.block, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, elem: elem.elem, mod: modName, val: modVal }; })); }); } else { res.push({ block: dep.block, elem: elem }); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (typeof elem === 'object') {··· res.push({ block: dep.block, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, elem: elem.elem, mod: modName, val: modVal }; })); }); } else { |
| ✗ Negative was not executed (else) | } else {··· res.push({ block: dep.block, elem: elem }); } |
| Function (anonymous_183) | |
|---|---|
| ✗ Was not called | Object.keys(elem.mods || {}).forEach(function (modName) {··· var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { block: dep.block, elem: elem.elem, mod: modName, val: modVal }; })); }); |
| Branch LogicalExpression | |
| ✗ Was not returned | Object.keys(elem.mods || {}).forEach(function (modName) { |
| ✗ Was not returned | Object.keys(elem.mods || {}).forEach(function (modName) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!Array.isArray(modVals)) {··· modVals = [modVals]; } |
| ✗ Negative was not executed (else) | }··· res = res.concat(modVals.map(function (modVal) { |
| Function (anonymous_184) | |
|---|---|
| ✗ Was not called | res = res.concat(modVals.map(function (modVal) {··· return { block: dep.block, elem: elem.elem, mod: modName, val: modVal }; })); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (dep.mod) {··· if (dep.val) { res.push({ block: dep.block, mod: dep.mod, val: dep.val }); } else { res.push({ block: dep.block, mod: dep.mod }); } } else { |
| ✗ Negative was not executed (else) | } else {··· res = [{ block: dep.block }]; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.val) {··· res.push({ block: dep.block, mod: dep.mod, val: dep.val }); } else { |
| ✗ Negative was not executed (else) | } else {··· res.push({ block: dep.block, mod: dep.mod }); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.tech) {··· res.forEach(function (resDep) { resDep.tech = dep.tech; }); } |
| ✗ Negative was not executed (else) | }··· return res; |
| Function (anonymous_185) | |
|---|---|
| ✗ Was not called | res.forEach(function (resDep) {··· resDep.tech = dep.tech; }); |
| Function (anonymous_186) | |
|---|---|
| ✗ Was not called | flattenDeps: function (deps) {··· if (Array.isArray(deps)) { var result = []; for (var i = 0, l = deps.length; i < l; i++) { result = result.concat(this.flattenDep(deps[i])); } return result; } else { return this.flattenDep(deps); } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (Array.isArray(deps)) {··· var result = []; for (var i = 0, l = deps.length; i < l; i++) { result = result.concat(this.flattenDep(deps[i])); } return result; } else { |
| ✗ Negative was not executed (else) | } else {··· return this.flattenDep(deps); } |
| Function depKey | |
|---|---|
| ✗ Was not called | function depKey(dep) {··· return dep.block + (dep.elem ? '__' + dep.elem : '') + (dep.mod ? '_' + dep.mod + (dep.val ? '_' + dep.val : '') : ''); } |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | (dep.elem ? '__' + dep.elem : '') + |
| ✗ Negative was not returned (: ...) | (dep.elem ? '__' + dep.elem : '') + |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | (dep.mod ? '_' + dep.mod + (dep.val ? '_' + dep.val : '') : ''); |
| ✗ Negative was not returned (: ...) | (dep.mod ? '_' + dep.mod + (dep.val ? '_' + dep.val : '') : ''); |
| Branch ConditionalExpression | |
| ✗ Positive was not returned (? ...) | (dep.mod ? '_' + dep.mod + (dep.val ? '_' + dep.val : '') : ''); |
| ✗ Negative was not returned (: ...) | (dep.mod ? '_' + dep.mod + (dep.val ? '_' + dep.val : '') : ''); |
| Function buildDepsIndex | |
|---|---|
| ✗ Was not called | function buildDepsIndex(deps) {··· var result = {}; for (var i = 0, l = deps.length; i < l; i++) { result[depKey(deps[i])] = true; } return result; } |
| Function (anonymous_189) | |
|---|---|
| ✗ Was not called | __constructor: function () {··· this.items = []; this.slices = []; this.bySuffix = {}; }, |
| Function (anonymous_190) | |
|---|---|
| ✗ Was not called | addFiles: function (files) {··· this.slices.push(files); for (var i = 0, l = files.length; i < l; i++) { var file = files[i]; this.items.push(file); (this.bySuffix[file.suffix] || (this.bySuffix[file.suffix] = [])).push(file); } }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (this.bySuffix[file.suffix] || (this.bySuffix[file.suffix] = [])).push(file); |
| ✗ Was not returned | (this.bySuffix[file.suffix] || (this.bySuffix[file.suffix] = [])).push(file); |
| Function (anonymous_191) | |
|---|---|
| ✗ Was not called | getBySuffix: function (suffix) {··· if (Array.isArray(suffix) && suffix.length === 1) { suffix = suffix[0]; } if (Array.isArray(suffix)) { var res = []; this.slices.forEach(function (slice) { suffix.forEach(function (s) { for (var i = 0, l = slice.length; i < l; i++) { var file = slice[i]; if (file.suffix === s) { res.push(file); } } }); }); return res; } else { return this.bySuffix[suffix] || []; } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (Array.isArray(suffix) && suffix.length === 1) {··· suffix = suffix[0]; } |
| ✗ Negative was not executed (else) | }··· if (Array.isArray(suffix)) { |
| Branch LogicalExpression | |
| ✗ Was not returned | if (Array.isArray(suffix) && suffix.length === 1) { |
| ✗ Was not returned | if (Array.isArray(suffix) && suffix.length === 1) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (Array.isArray(suffix)) {··· var res = []; this.slices.forEach(function (slice) { suffix.forEach(function (s) { for (var i = 0, l = slice.length; i < l; i++) { var file = slice[i]; if (file.suffix === s) { res.push(file); } } }); }); return res; } else { |
| ✗ Negative was not executed (else) | } else {··· return this.bySuffix[suffix] || []; } |
| Function (anonymous_192) | |
|---|---|
| ✗ Was not called | this.slices.forEach(function (slice) {··· suffix.forEach(function (s) { for (var i = 0, l = slice.length; i < l; i++) { var file = slice[i]; if (file.suffix === s) { res.push(file); } } }); }); |
| Function (anonymous_193) | |
|---|---|
| ✗ Was not called | suffix.forEach(function (s) {··· for (var i = 0, l = slice.length; i < l; i++) { var file = slice[i]; if (file.suffix === s) { res.push(file); } } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (file.suffix === s) {··· res.push(file); } |
| ✗ Negative was not executed (else) | }··· } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return this.bySuffix[suffix] || []; |
| ✗ Was not returned | return this.bySuffix[suffix] || []; |
| Function (anonymous_194) | |
|---|---|
| ✗ Was not called | getByName: function (name) {··· return this.items.filter(function (file) { return file.name === name; }); }, |
| Function (anonymous_195) | |
|---|---|
| ✗ Was not called | return this.items.filter(function (file) {··· return file.name === name; }); |
| Function (anonymous_196) | |
|---|---|
| ✗ Was not called | loadFromDirSync: function (dirname, recursive) {··· var files = []; var _this = this; filterFiles(fs.readdirSync(dirname)).forEach(function (filename) { var fullname = dirname + '/' + filename; var stat = fs.statSync(fullname); if (stat.isFile()) { files.push({ name: filename, fullname: fullname, suffix: getSuffix(filename), mtime: stat.mtime.getTime() }); } else if (stat.isDirectory()) { if (recursive) { _this.loadFromDirSync(fullname, recursive); } } }); this.addFiles(files); }, |
| Function (anonymous_197) | |
|---|---|
| ✗ Was not called | filterFiles(fs.readdirSync(dirname)).forEach(function (filename) {··· var fullname = dirname + '/' + filename; var stat = fs.statSync(fullname); if (stat.isFile()) { files.push({ name: filename, fullname: fullname, suffix: getSuffix(filename), mtime: stat.mtime.getTime() }); } else if (stat.isDirectory()) { if (recursive) { _this.loadFromDirSync(fullname, recursive); } } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (stat.isFile()) {··· files.push({ name: filename, fullname: fullname, suffix: getSuffix(filename), mtime: stat.mtime.getTime() }); } else if (stat.isDirectory()) { |
| ✗ Negative was not executed (else) | } else if (stat.isDirectory()) {··· if (recursive) { _this.loadFromDirSync(fullname, recursive); } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (stat.isDirectory()) {··· if (recursive) { _this.loadFromDirSync(fullname, recursive); } } |
| ✗ Negative was not executed (else) | }··· }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (recursive) {··· _this.loadFromDirSync(fullname, recursive); } |
| ✗ Negative was not executed (else) | }··· } |
| Function (anonymous_198) | |
|---|---|
| ✗ Was not called | loadFromDir: function (dirname, recursive) {··· var _this = this; return this._loadFromDir(dirname, recursive).then(function (files) { _this.addFiles(files); }); }, |
| Function (anonymous_199) | |
|---|---|
| ✗ Was not called | return this._loadFromDir(dirname, recursive).then(function (files) {··· _this.addFiles(files); }); |
| Function (anonymous_200) | |
|---|---|
| ✗ Was not called | _loadFromDir: function (dirname, recursive) {··· var _this = this; return vowFs.listDir(dirname).then(function (filenames) { return Vow.all(filenames.map(function (filename) { var fullname = dirname + '/' + filename; return vowFs.stat(fullname).then(function (stat) { if (stat.isFile()) { return [{ name: filename, fullname: fullname, suffix: getSuffix(filename), mtime: stat.mtime.getTime() }]; } else if (stat.isDirectory()) { if (recursive) { return _this._loadFromDir(fullname, recursive); } } return []; }); })); }).then(function (fileLists) { return [].concat.apply([], fileLists); }); }, |
| Function (anonymous_201) | |
|---|---|
| ✗ Was not called | return vowFs.listDir(dirname).then(function (filenames) {··· return Vow.all(filenames.map(function (filename) { var fullname = dirname + '/' + filename; return vowFs.stat(fullname).then(function (stat) { if (stat.isFile()) { return [{ name: filename, fullname: fullname, suffix: getSuffix(filename), mtime: stat.mtime.getTime() }]; } else if (stat.isDirectory()) { if (recursive) { return _this._loadFromDir(fullname, recursive); } } return []; }); })); }).then(function (fileLists) { |
| Function (anonymous_202) | |
|---|---|
| ✗ Was not called | return Vow.all(filenames.map(function (filename) {··· var fullname = dirname + '/' + filename; return vowFs.stat(fullname).then(function (stat) { if (stat.isFile()) { return [{ name: filename, fullname: fullname, suffix: getSuffix(filename), mtime: stat.mtime.getTime() }]; } else if (stat.isDirectory()) { if (recursive) { return _this._loadFromDir(fullname, recursive); } } return []; }); })); |
| Function (anonymous_203) | |
|---|---|
| ✗ Was not called | return vowFs.stat(fullname).then(function (stat) {··· if (stat.isFile()) { return [{ name: filename, fullname: fullname, suffix: getSuffix(filename), mtime: stat.mtime.getTime() }]; } else if (stat.isDirectory()) { if (recursive) { return _this._loadFromDir(fullname, recursive); } } return []; }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (stat.isFile()) {··· return [{ name: filename, fullname: fullname, suffix: getSuffix(filename), mtime: stat.mtime.getTime() }]; } else if (stat.isDirectory()) { |
| ✗ Negative was not executed (else) | } else if (stat.isDirectory()) {··· if (recursive) { return _this._loadFromDir(fullname, recursive); } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (stat.isDirectory()) {··· if (recursive) { return _this._loadFromDir(fullname, recursive); } } |
| ✗ Negative was not executed (else) | }··· return []; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (recursive) {··· return _this._loadFromDir(fullname, recursive); } |
| ✗ Negative was not executed (else) | }··· } |
| Function (anonymous_204) | |
|---|---|
| ✗ Was not called | }).then(function (fileLists) {··· return [].concat.apply([], fileLists); }); |
| Function getFileInfo | |
|---|---|
| ✗ Was not called | function getFileInfo(filename) {··· var baseName = path.basename(filename); var suffix = baseName.split('.').slice(1).join('.'); var stat = fs.statSync(filename); return { name: baseName, fullname: filename, suffix: suffix, mtime: stat.mtime.getTime(), isDirectory: stat.isDirectory() }; } |
| Function parseFilename | |
|---|---|
| ✗ Was not called | function parseFilename(filename) {··· var filenameParts = filename.split('.'); var filenameWithoutSuffix = filenameParts[0]; var suffix = filenameParts.slice(1).join('.'); var bem = {}; var modParts; if (~filenameWithoutSuffix.indexOf('__')) { var blockElemParts = filenameWithoutSuffix.split('__'); bem.block = blockElemParts[0]; var elemParts = blockElemParts[1].split('_'); bem.elem = elemParts[0]; modParts = elemParts.slice(1); } else { var blockParts = filenameWithoutSuffix.split('_'); bem.block = blockParts[0]; modParts = blockParts.slice(1); } if (modParts.length) { bem.modName = modParts[0]; bem.modVal = modParts[1] || ''; } var bemdecl = { name: bem.block }; if (bem.elem) { if (bem.modName) { bemdecl.elems = [{ name: bem.elem, mods: [{ name: bem.modName, vals: [ {name: bem.modVal} ] }]}]; } else { bemdecl.elems = [{ name: bem.elem }]; } } else if (bem.modName) { bemdecl.mods = [{ name: bem.modName, vals: [ {name: bem.modVal} ] }]; } return { filenameWithoutSuffix: filenameWithoutSuffix, suffix: suffix, bem: bem, bemdecl: bemdecl }; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (~filenameWithoutSuffix.indexOf('__')) {··· var blockElemParts = filenameWithoutSuffix.split('__'); bem.block = blockElemParts[0]; var elemParts = blockElemParts[1].split('_'); bem.elem = elemParts[0]; modParts = elemParts.slice(1); } else { |
| ✗ Negative was not executed (else) | } else {··· var blockParts = filenameWithoutSuffix.split('_'); bem.block = blockParts[0]; modParts = blockParts.slice(1); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (modParts.length) {··· bem.modName = modParts[0]; bem.modVal = modParts[1] || ''; } |
| ✗ Negative was not executed (else) | }··· var bemdecl = { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | bem.modVal = modParts[1] || ''; |
| ✗ Was not returned | bem.modVal = modParts[1] || ''; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (bem.elem) {··· if (bem.modName) { bemdecl.elems = [{ name: bem.elem, mods: [{ name: bem.modName, vals: [ {name: bem.modVal} ] }]}]; } else { bemdecl.elems = [{ name: bem.elem }]; } } else if (bem.modName) { |
| ✗ Negative was not executed (else) | } else if (bem.modName) {··· bemdecl.mods = [{ name: bem.modName, vals: [ {name: bem.modVal} ] }]; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (bem.modName) {··· bemdecl.elems = [{ name: bem.elem, mods: [{ name: bem.modName, vals: [ {name: bem.modVal} ] }]}]; } else { |
| ✗ Negative was not executed (else) | } else {··· bemdecl.elems = [{ name: bem.elem }]; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (bem.modName) {··· bemdecl.mods = [{ name: bem.modName, vals: [ {name: bem.modVal} ] }]; } |
| ✗ Negative was not executed (else) | }··· return { |
| Function filterFiles | |
|---|---|
| ✗ Was not called | function filterFiles(filenames) {··· return filenames.filter(function (filename) { return filename.charAt(0) !== '.'; }); } |
| Function (anonymous_208) | |
|---|---|
| ✗ Was not called | return filenames.filter(function (filename) {··· return filename.charAt(0) !== '.'; }); |
| Function getSuffix | |
|---|---|
| ✗ Was not called | function getSuffix(filename) {··· return filename.split('.').slice(1).join('.'); } |
| Function DepsError | |
|---|---|
| ✗ Was not called | function DepsError(message) {··· this.message = message; Error.captureStackTrace(this, DepsError); } |
| Function (anonymous_211) | |
|---|---|
| ✗ Was not called | __constructor: function (levels) {··· this.levels = levels; this.declarations = []; this.resolved = {}; this.declarationIndex = {}; }, |
| Function (anonymous_212) | |
|---|---|
| ✗ Was not called | normalizeDep: function (dep, blockName, elemName) {··· var levels = this.levels; if (typeof dep === 'string') { return [{ name: dep }]; } else { var res = []; if (!dep || !(dep instanceof Object)) { throw new DepsError('Deps shoud be instance of Object or String'); } if (dep.view) { (dep.mods || (dep.mods = {})).view = dep.view; } if (dep.skin) { (dep.mods || (dep.mods = {})).skin = dep.skin; } if (dep.elem) { if (dep.mods) { Object.keys(dep.mods).forEach(function (modName) { var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: dep.elem, modName: modName, modVal: modVal }; })); }); } else if (dep.mod) { res.push({ name: dep.block || blockName, elem: dep.elem, modName: dep.mod, modVal: dep.val }); } else { res.push({ name: dep.block || blockName, elem: dep.elem }); } } else if (dep.mod || dep.mods || dep.elems) { if (dep.mod) { res.push({ name: dep.block || blockName, modName: dep.mod, modVal: dep.val }); } Object.keys(dep.mods || {}).forEach(function (modName) { var modVals = dep.mods[modName]; if (modVals === '*') { modVals = levels.getModValues(dep.block || blockName, modName); } if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { if (elemName && !dep.block && !dep.elem) { return { name: dep.block || blockName, elem: elemName, modName: modName, modVal: modVal }; } else { return { name: dep.block || blockName, modName: modName, modVal: modVal }; } })); }); if (dep.elems) { res.push({ name: dep.block || blockName }); var elems = dep.elems || []; if (!Array.isArray(elems)) { elems = [elems]; } elems.forEach(function (elem) { if (typeof elem === 'object') { res.push({ name: dep.block || blockName, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: elem.elem, modName: modName, modVal: modVal }; })); }); } else { res.push({ name: dep.block || blockName, elem: elem }); } }); } } else { res = [{ name: dep.block || blockName }]; } if (dep.required) { res.forEach(function (subDep) { subDep.required = true; }); } return res; } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (typeof dep === 'string') {··· return [{ name: dep }]; } else { |
| ✗ Negative was not executed (else) | } else {··· var res = []; if (!dep || !(dep instanceof Object)) { throw new DepsError('Deps shoud be instance of Object or String'); } if (dep.view) { (dep.mods || (dep.mods = {})).view = dep.view; } if (dep.skin) { (dep.mods || (dep.mods = {})).skin = dep.skin; } if (dep.elem) { if (dep.mods) { Object.keys(dep.mods).forEach(function (modName) { var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: dep.elem, modName: modName, modVal: modVal }; })); }); } else if (dep.mod) { res.push({ name: dep.block || blockName, elem: dep.elem, modName: dep.mod, modVal: dep.val }); } else { res.push({ name: dep.block || blockName, elem: dep.elem }); } } else if (dep.mod || dep.mods || dep.elems) { if (dep.mod) { res.push({ name: dep.block || blockName, modName: dep.mod, modVal: dep.val }); } Object.keys(dep.mods || {}).forEach(function (modName) { var modVals = dep.mods[modName]; if (modVals === '*') { modVals = levels.getModValues(dep.block || blockName, modName); } if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { if (elemName && !dep.block && !dep.elem) { return { name: dep.block || blockName, elem: elemName, modName: modName, modVal: modVal }; } else { return { name: dep.block || blockName, modName: modName, modVal: modVal }; } })); }); if (dep.elems) { res.push({ name: dep.block || blockName }); var elems = dep.elems || []; if (!Array.isArray(elems)) { elems = [elems]; } elems.forEach(function (elem) { if (typeof elem === 'object') { res.push({ name: dep.block || blockName, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: elem.elem, modName: modName, modVal: modVal }; })); }); } else { res.push({ name: dep.block || blockName, elem: elem }); } }); } } else { res = [{ name: dep.block || blockName }]; } if (dep.required) { res.forEach(function (subDep) { subDep.required = true; }); } return res; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!dep || !(dep instanceof Object)) {··· throw new DepsError('Deps shoud be instance of Object or String'); } |
| ✗ Negative was not executed (else) | }··· if (dep.view) { |
| Branch LogicalExpression | |
| ✗ Was not returned | if (!dep || !(dep instanceof Object)) { |
| ✗ Was not returned | if (!dep || !(dep instanceof Object)) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.view) {··· (dep.mods || (dep.mods = {})).view = dep.view; } |
| ✗ Negative was not executed (else) | }··· if (dep.skin) { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (dep.mods || (dep.mods = {})).view = dep.view; |
| ✗ Was not returned | (dep.mods || (dep.mods = {})).view = dep.view; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.skin) {··· (dep.mods || (dep.mods = {})).skin = dep.skin; } |
| ✗ Negative was not executed (else) | }··· if (dep.elem) { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (dep.mods || (dep.mods = {})).skin = dep.skin; |
| ✗ Was not returned | (dep.mods || (dep.mods = {})).skin = dep.skin; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.elem) {··· if (dep.mods) { Object.keys(dep.mods).forEach(function (modName) { var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: dep.elem, modName: modName, modVal: modVal }; })); }); } else if (dep.mod) { res.push({ name: dep.block || blockName, elem: dep.elem, modName: dep.mod, modVal: dep.val }); } else { res.push({ name: dep.block || blockName, elem: dep.elem }); } } else if (dep.mod || dep.mods || dep.elems) { |
| ✗ Negative was not executed (else) | } else if (dep.mod || dep.mods || dep.elems) {··· if (dep.mod) { res.push({ name: dep.block || blockName, modName: dep.mod, modVal: dep.val }); } Object.keys(dep.mods || {}).forEach(function (modName) { var modVals = dep.mods[modName]; if (modVals === '*') { modVals = levels.getModValues(dep.block || blockName, modName); } if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { if (elemName && !dep.block && !dep.elem) { return { name: dep.block || blockName, elem: elemName, modName: modName, modVal: modVal }; } else { return { name: dep.block || blockName, modName: modName, modVal: modVal }; } })); }); if (dep.elems) { res.push({ name: dep.block || blockName }); var elems = dep.elems || []; if (!Array.isArray(elems)) { elems = [elems]; } elems.forEach(function (elem) { if (typeof elem === 'object') { res.push({ name: dep.block || blockName, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: elem.elem, modName: modName, modVal: modVal }; })); }); } else { res.push({ name: dep.block || blockName, elem: elem }); } }); } } else { res = [{ name: dep.block || blockName }]; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.mods) {··· Object.keys(dep.mods).forEach(function (modName) { var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: dep.elem, modName: modName, modVal: modVal }; })); }); } else if (dep.mod) { |
| ✗ Negative was not executed (else) | } else if (dep.mod) {··· res.push({ name: dep.block || blockName, elem: dep.elem, modName: dep.mod, modVal: dep.val }); } else { res.push({ name: dep.block || blockName, elem: dep.elem }); } |
| Function (anonymous_213) | |
|---|---|
| ✗ Was not called | Object.keys(dep.mods).forEach(function (modName) {··· var modVals = dep.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: dep.elem, modName: modName, modVal: modVal }; })); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!Array.isArray(modVals)) {··· modVals = [modVals]; } |
| ✗ Negative was not executed (else) | }··· res = res.concat(modVals.map(function (modVal) { |
| Function (anonymous_214) | |
|---|---|
| ✗ Was not called | res = res.concat(modVals.map(function (modVal) {··· return { name: dep.block || blockName, elem: dep.elem, modName: modName, modVal: modVal }; })); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return { name: dep.block || blockName, elem: dep.elem, modName: modName, modVal: modVal }; |
| ✗ Was not returned | return { name: dep.block || blockName, elem: dep.elem, modName: modName, modVal: modVal }; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (dep.mod) {··· res.push({ name: dep.block || blockName, elem: dep.elem, modName: dep.mod, modVal: dep.val }); } else { |
| ✗ Negative was not executed (else) | } else {··· res.push({ name: dep.block || blockName, elem: dep.elem }); } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | res.push({ name: dep.block || blockName, elem: dep.elem, modName: dep.mod, modVal: dep.val }); |
| ✗ Was not returned | res.push({ name: dep.block || blockName, elem: dep.elem, modName: dep.mod, modVal: dep.val }); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | res.push({ name: dep.block || blockName, elem: dep.elem }); |
| ✗ Was not returned | res.push({ name: dep.block || blockName, elem: dep.elem }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (dep.mod || dep.mods || dep.elems) {··· if (dep.mod) { res.push({ name: dep.block || blockName, modName: dep.mod, modVal: dep.val }); } Object.keys(dep.mods || {}).forEach(function (modName) { var modVals = dep.mods[modName]; if (modVals === '*') { modVals = levels.getModValues(dep.block || blockName, modName); } if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { if (elemName && !dep.block && !dep.elem) { return { name: dep.block || blockName, elem: elemName, modName: modName, modVal: modVal }; } else { return { name: dep.block || blockName, modName: modName, modVal: modVal }; } })); }); if (dep.elems) { res.push({ name: dep.block || blockName }); var elems = dep.elems || []; if (!Array.isArray(elems)) { elems = [elems]; } elems.forEach(function (elem) { if (typeof elem === 'object') { res.push({ name: dep.block || blockName, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: elem.elem, modName: modName, modVal: modVal }; })); }); } else { res.push({ name: dep.block || blockName, elem: elem }); } }); } } else { |
| ✗ Negative was not executed (else) | } else {··· res = [{ name: dep.block || blockName }]; } |
| Branch LogicalExpression | |
| ✗ Was not returned | } else if (dep.mod || dep.mods || dep.elems) { |
| ✗ Was not returned | } else if (dep.mod || dep.mods || dep.elems) { |
| Branch LogicalExpression | |
| ✗ Was not returned | } else if (dep.mod || dep.mods || dep.elems) { |
| ✗ Was not returned | } else if (dep.mod || dep.mods || dep.elems) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.mod) {··· res.push({ name: dep.block || blockName, modName: dep.mod, modVal: dep.val }); } |
| ✗ Negative was not executed (else) | }··· Object.keys(dep.mods || {}).forEach(function (modName) { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | res.push({ name: dep.block || blockName, modName: dep.mod, modVal: dep.val }); |
| ✗ Was not returned | res.push({ name: dep.block || blockName, modName: dep.mod, modVal: dep.val }); |
| Function (anonymous_215) | |
|---|---|
| ✗ Was not called | Object.keys(dep.mods || {}).forEach(function (modName) {··· var modVals = dep.mods[modName]; if (modVals === '*') { modVals = levels.getModValues(dep.block || blockName, modName); } if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { if (elemName && !dep.block && !dep.elem) { return { name: dep.block || blockName, elem: elemName, modName: modName, modVal: modVal }; } else { return { name: dep.block || blockName, modName: modName, modVal: modVal }; } })); }); |
| Branch LogicalExpression | |
| ✗ Was not returned | Object.keys(dep.mods || {}).forEach(function (modName) { |
| ✗ Was not returned | Object.keys(dep.mods || {}).forEach(function (modName) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (modVals === '*') {··· modVals = levels.getModValues(dep.block || blockName, modName); } |
| ✗ Negative was not executed (else) | }··· if (!Array.isArray(modVals)) { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | modVals = levels.getModValues(dep.block || blockName, modName); |
| ✗ Was not returned | modVals = levels.getModValues(dep.block || blockName, modName); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!Array.isArray(modVals)) {··· modVals = [modVals]; } |
| ✗ Negative was not executed (else) | }··· res = res.concat(modVals.map(function (modVal) { |
| Function (anonymous_216) | |
|---|---|
| ✗ Was not called | res = res.concat(modVals.map(function (modVal) {··· if (elemName && !dep.block && !dep.elem) { return { name: dep.block || blockName, elem: elemName, modName: modName, modVal: modVal }; } else { return { name: dep.block || blockName, modName: modName, modVal: modVal }; } })); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (elemName && !dep.block && !dep.elem) {··· return { name: dep.block || blockName, elem: elemName, modName: modName, modVal: modVal }; } else { |
| ✗ Negative was not executed (else) | } else {··· return { name: dep.block || blockName, modName: modName, modVal: modVal }; } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (elemName && !dep.block && !dep.elem) { |
| ✗ Was not returned | if (elemName && !dep.block && !dep.elem) { |
| Branch LogicalExpression | |
| ✗ Was not returned | if (elemName && !dep.block && !dep.elem) { |
| ✗ Was not returned | if (elemName && !dep.block && !dep.elem) { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return { name: dep.block || blockName, elem: elemName, modName: modName, modVal: modVal }; |
| ✗ Was not returned | return { name: dep.block || blockName, elem: elemName, modName: modName, modVal: modVal }; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return { name: dep.block || blockName, modName: modName, modVal: modVal }; |
| ✗ Was not returned | return { name: dep.block || blockName, modName: modName, modVal: modVal }; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.elems) {··· res.push({ name: dep.block || blockName }); var elems = dep.elems || []; if (!Array.isArray(elems)) { elems = [elems]; } elems.forEach(function (elem) { if (typeof elem === 'object') { res.push({ name: dep.block || blockName, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: elem.elem, modName: modName, modVal: modVal }; })); }); } else { res.push({ name: dep.block || blockName, elem: elem }); } }); } |
| ✗ Negative was not executed (else) | }··· } else { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | res.push({ name: dep.block || blockName }); |
| ✗ Was not returned | res.push({ name: dep.block || blockName }); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var elems = dep.elems || []; |
| ✗ Was not returned | var elems = dep.elems || []; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!Array.isArray(elems)) {··· elems = [elems]; } |
| ✗ Negative was not executed (else) | }··· elems.forEach(function (elem) { |
| Function (anonymous_217) | |
|---|---|
| ✗ Was not called | elems.forEach(function (elem) {··· if (typeof elem === 'object') { res.push({ name: dep.block || blockName, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: elem.elem, modName: modName, modVal: modVal }; })); }); } else { res.push({ name: dep.block || blockName, elem: elem }); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (typeof elem === 'object') {··· res.push({ name: dep.block || blockName, elem: elem.elem }); Object.keys(elem.mods || {}).forEach(function (modName) { var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: elem.elem, modName: modName, modVal: modVal }; })); }); } else { |
| ✗ Negative was not executed (else) | } else {··· res.push({ name: dep.block || blockName, elem: elem }); } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | res.push({ name: dep.block || blockName, elem: elem.elem }); |
| ✗ Was not returned | res.push({ name: dep.block || blockName, elem: elem.elem }); |
| Function (anonymous_218) | |
|---|---|
| ✗ Was not called | Object.keys(elem.mods || {}).forEach(function (modName) {··· var modVals = elem.mods[modName]; if (!Array.isArray(modVals)) { modVals = [modVals]; } res = res.concat(modVals.map(function (modVal) { return { name: dep.block || blockName, elem: elem.elem, modName: modName, modVal: modVal }; })); }); |
| Branch LogicalExpression | |
| ✗ Was not returned | Object.keys(elem.mods || {}).forEach(function (modName) { |
| ✗ Was not returned | Object.keys(elem.mods || {}).forEach(function (modName) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!Array.isArray(modVals)) {··· modVals = [modVals]; } |
| ✗ Negative was not executed (else) | }··· res = res.concat(modVals.map(function (modVal) { |
| Function (anonymous_219) | |
|---|---|
| ✗ Was not called | res = res.concat(modVals.map(function (modVal) {··· return { name: dep.block || blockName, elem: elem.elem, modName: modName, modVal: modVal }; })); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | name: dep.block || blockName, |
| ✗ Was not returned | name: dep.block || blockName, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | res.push({ name: dep.block || blockName, elem: elem }); |
| ✗ Was not returned | res.push({ name: dep.block || blockName, elem: elem }); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | res = [{ name: dep.block || blockName }]; |
| ✗ Was not returned | res = [{ name: dep.block || blockName }]; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.required) {··· res.forEach(function (subDep) { subDep.required = true; }); } |
| ✗ Negative was not executed (else) | }··· return res; |
| Function (anonymous_220) | |
|---|---|
| ✗ Was not called | res.forEach(function (subDep) {··· subDep.required = true; }); |
| Function (anonymous_221) | |
|---|---|
| ✗ Was not called | normalizeDeps: function (deps, blockName, elemName) {··· if (Array.isArray(deps)) { var result = []; for (var i = 0, l = deps.length; i < l; i++) { result = result.concat(this.normalizeDep(deps[i], blockName, elemName)); } return result; } else { return this.normalizeDep(deps, blockName, elemName); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (Array.isArray(deps)) {··· var result = []; for (var i = 0, l = deps.length; i < l; i++) { result = result.concat(this.normalizeDep(deps[i], blockName, elemName)); } return result; } else { |
| ✗ Negative was not executed (else) | } else {··· return this.normalizeDep(deps, blockName, elemName); } |
| Function (anonymous_222) | |
|---|---|
| ✗ Was not called | getDeps: function (decl) {··· var _this = this; var mustDecls; var files; if (decl.elem) { files = this.levels.getElemFiles(decl.name, decl.elem, decl.modName, decl.modVal); } else { files = this.levels.getBlockFiles(decl.name, decl.modName, decl.modVal); } files = files.filter(function (file) { return file.suffix === 'deps.js' || file.suffix === 'deps.yaml'; }); var mustDepIndex = {}; var shouldDepIndex = {}; mustDepIndex[declKey(decl)] = true; var mustDeps = []; if (decl.modName) { if (decl.elem) { mustDecls = [ { name: decl.name, elem: decl.elem } ]; if (decl.modVal) { mustDecls.push({ name: decl.name, elem: decl.elem, modName: decl.modName }); } } else { mustDecls = [ { name: decl.name } ]; if (decl.modVal) { mustDecls.push({ name: decl.name, modName: decl.modName }); } } mustDecls.forEach(function (mustDecl) { mustDecl.key = declKey(mustDecl); mustDepIndex[mustDecl.key] = true; mustDeps.push(mustDecl); }); } var shouldDeps = []; function keepWorking(file) { return vowFs.read(file.fullname, 'utf8').then(function (depContent) { if (file.suffix === 'deps.js') { var depData; try { depData = vm.runInThisContext(depContent); } catch (e) { throw new Error('Syntax error in file "' + file.fullname + '": ' + e.message); } depData = Array.isArray(depData) ? depData : [depData]; depData.forEach(function (dep) { if (!dep.tech) { if (dep.mustDeps) { _this.normalizeDeps(dep.mustDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!mustDepIndex[key]) { mustDepIndex[key] = true; nd.key = key; mustDeps.push(nd); } }); } if (dep.shouldDeps) { _this.normalizeDeps(dep.shouldDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!shouldDepIndex[key]) { shouldDepIndex[key] = true; nd.key = key; shouldDeps.push(nd); } }); } if (dep.noDeps) { _this.normalizeDeps(dep.noDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); nd.key = key; removeFromDeps(nd, mustDepIndex, mustDeps); removeFromDeps(nd, shouldDepIndex, shouldDeps); }); } } }); } else if (file.suffix === 'deps.yaml') { var depYamlStructure = yaml.safeLoad(depContent, { filename: file.fullname, strict: true }); if (!Array.isArray(depYamlStructure)) { throw new Error('Invalid yaml deps structure at: ' + file.fullname); } _this.normalizeDeps(depYamlStructure, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); var index; var depList; if (nd.required) { index = mustDepIndex; depList = mustDeps; } else { index = shouldDepIndex; depList = shouldDeps; } if (!index[key]) { index[key] = true; nd.key = key; depList.push(nd); } }); } if (files.length > 0) { return keepWorking(files.shift()); } else { return null; } }).fail(function (err) { if (err instanceof DepsError) { err.message += ' in file "' + file.fullname + '"'; } throw err; }); } function removeFromDeps(decl, index, list) { if (index[decl.key]) { for (var i = 0, l = list.length; i < l; i++) { if (list[i].key === decl.key) { return list.splice(i, 1); } } } else { index[decl.key] = true; } return null; } var result = { mustDeps: mustDeps, shouldDeps: shouldDeps }; if (files.length > 0) { return keepWorking(files.shift()).then(function () { return result; }); } else { return Vow.fulfill(result); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (decl.elem) {··· files = this.levels.getElemFiles(decl.name, decl.elem, decl.modName, decl.modVal); } else { |
| ✗ Negative was not executed (else) | } else {··· files = this.levels.getBlockFiles(decl.name, decl.modName, decl.modVal); } |
| Function (anonymous_223) | |
|---|---|
| ✗ Was not called | files = files.filter(function (file) {··· return file.suffix === 'deps.js' || file.suffix === 'deps.yaml'; }); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return file.suffix === 'deps.js' || file.suffix === 'deps.yaml'; |
| ✗ Was not returned | return file.suffix === 'deps.js' || file.suffix === 'deps.yaml'; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (decl.modName) {··· if (decl.elem) { mustDecls = [ { name: decl.name, elem: decl.elem } ]; if (decl.modVal) { mustDecls.push({ name: decl.name, elem: decl.elem, modName: decl.modName }); } } else { mustDecls = [ { name: decl.name } ]; if (decl.modVal) { mustDecls.push({ name: decl.name, modName: decl.modName }); } } mustDecls.forEach(function (mustDecl) { mustDecl.key = declKey(mustDecl); mustDepIndex[mustDecl.key] = true; mustDeps.push(mustDecl); }); } |
| ✗ Negative was not executed (else) | }··· var shouldDeps = []; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (decl.elem) {··· mustDecls = [ { name: decl.name, elem: decl.elem } ]; if (decl.modVal) { mustDecls.push({ name: decl.name, elem: decl.elem, modName: decl.modName }); } } else { |
| ✗ Negative was not executed (else) | } else {··· mustDecls = [ { name: decl.name } ]; if (decl.modVal) { mustDecls.push({ name: decl.name, modName: decl.modName }); } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (decl.modVal) {··· mustDecls.push({ name: decl.name, elem: decl.elem, modName: decl.modName }); } |
| ✗ Negative was not executed (else) | }··· } else { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (decl.modVal) {··· mustDecls.push({ name: decl.name, modName: decl.modName }); } |
| ✗ Negative was not executed (else) | }··· } |
| Function (anonymous_224) | |
|---|---|
| ✗ Was not called | mustDecls.forEach(function (mustDecl) {··· mustDecl.key = declKey(mustDecl); mustDepIndex[mustDecl.key] = true; mustDeps.push(mustDecl); }); |
| Function keepWorking | |
|---|---|
| ✗ Was not called | function keepWorking(file) {··· return vowFs.read(file.fullname, 'utf8').then(function (depContent) { if (file.suffix === 'deps.js') { var depData; try { depData = vm.runInThisContext(depContent); } catch (e) { throw new Error('Syntax error in file "' + file.fullname + '": ' + e.message); } depData = Array.isArray(depData) ? depData : [depData]; depData.forEach(function (dep) { if (!dep.tech) { if (dep.mustDeps) { _this.normalizeDeps(dep.mustDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!mustDepIndex[key]) { mustDepIndex[key] = true; nd.key = key; mustDeps.push(nd); } }); } if (dep.shouldDeps) { _this.normalizeDeps(dep.shouldDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!shouldDepIndex[key]) { shouldDepIndex[key] = true; nd.key = key; shouldDeps.push(nd); } }); } if (dep.noDeps) { _this.normalizeDeps(dep.noDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); nd.key = key; removeFromDeps(nd, mustDepIndex, mustDeps); removeFromDeps(nd, shouldDepIndex, shouldDeps); }); } } }); } else if (file.suffix === 'deps.yaml') { var depYamlStructure = yaml.safeLoad(depContent, { filename: file.fullname, strict: true }); if (!Array.isArray(depYamlStructure)) { throw new Error('Invalid yaml deps structure at: ' + file.fullname); } _this.normalizeDeps(depYamlStructure, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); var index; var depList; if (nd.required) { index = mustDepIndex; depList = mustDeps; } else { index = shouldDepIndex; depList = shouldDeps; } if (!index[key]) { index[key] = true; nd.key = key; depList.push(nd); } }); } if (files.length > 0) { return keepWorking(files.shift()); } else { return null; } }).fail(function (err) { if (err instanceof DepsError) { err.message += ' in file "' + file.fullname + '"'; } throw err; }); } |
| Function (anonymous_226) | |
|---|---|
| ✗ Was not called | return vowFs.read(file.fullname, 'utf8').then(function (depContent) {··· if (file.suffix === 'deps.js') { var depData; try { depData = vm.runInThisContext(depContent); } catch (e) { throw new Error('Syntax error in file "' + file.fullname + '": ' + e.message); } depData = Array.isArray(depData) ? depData : [depData]; depData.forEach(function (dep) { if (!dep.tech) { if (dep.mustDeps) { _this.normalizeDeps(dep.mustDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!mustDepIndex[key]) { mustDepIndex[key] = true; nd.key = key; mustDeps.push(nd); } }); } if (dep.shouldDeps) { _this.normalizeDeps(dep.shouldDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!shouldDepIndex[key]) { shouldDepIndex[key] = true; nd.key = key; shouldDeps.push(nd); } }); } if (dep.noDeps) { _this.normalizeDeps(dep.noDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); nd.key = key; removeFromDeps(nd, mustDepIndex, mustDeps); removeFromDeps(nd, shouldDepIndex, shouldDeps); }); } } }); } else if (file.suffix === 'deps.yaml') { var depYamlStructure = yaml.safeLoad(depContent, { filename: file.fullname, strict: true }); if (!Array.isArray(depYamlStructure)) { throw new Error('Invalid yaml deps structure at: ' + file.fullname); } _this.normalizeDeps(depYamlStructure, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); var index; var depList; if (nd.required) { index = mustDepIndex; depList = mustDeps; } else { index = shouldDepIndex; depList = shouldDeps; } if (!index[key]) { index[key] = true; nd.key = key; depList.push(nd); } }); } if (files.length > 0) { return keepWorking(files.shift()); } else { return null; } }).fail(function (err) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (file.suffix === 'deps.js') {··· var depData; try { depData = vm.runInThisContext(depContent); } catch (e) { throw new Error('Syntax error in file "' + file.fullname + '": ' + e.message); } depData = Array.isArray(depData) ? depData : [depData]; depData.forEach(function (dep) { if (!dep.tech) { if (dep.mustDeps) { _this.normalizeDeps(dep.mustDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!mustDepIndex[key]) { mustDepIndex[key] = true; nd.key = key; mustDeps.push(nd); } }); } if (dep.shouldDeps) { _this.normalizeDeps(dep.shouldDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!shouldDepIndex[key]) { shouldDepIndex[key] = true; nd.key = key; shouldDeps.push(nd); } }); } if (dep.noDeps) { _this.normalizeDeps(dep.noDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); nd.key = key; removeFromDeps(nd, mustDepIndex, mustDeps); removeFromDeps(nd, shouldDepIndex, shouldDeps); }); } } }); } else if (file.suffix === 'deps.yaml') { |
| ✗ Negative was not executed (else) | } else if (file.suffix === 'deps.yaml') {··· var depYamlStructure = yaml.safeLoad(depContent, { filename: file.fullname, strict: true }); if (!Array.isArray(depYamlStructure)) { throw new Error('Invalid yaml deps structure at: ' + file.fullname); } _this.normalizeDeps(depYamlStructure, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); var index; var depList; if (nd.required) { index = mustDepIndex; depList = mustDeps; } else { index = shouldDepIndex; depList = shouldDeps; } if (!index[key]) { index[key] = true; nd.key = key; depList.push(nd); } }); } |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | depData = Array.isArray(depData) ? depData : [depData]; |
| ✗ Negative was not returned (: ...) | depData = Array.isArray(depData) ? depData : [depData]; |
| Function (anonymous_227) | |
|---|---|
| ✗ Was not called | depData.forEach(function (dep) {··· if (!dep.tech) { if (dep.mustDeps) { _this.normalizeDeps(dep.mustDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!mustDepIndex[key]) { mustDepIndex[key] = true; nd.key = key; mustDeps.push(nd); } }); } if (dep.shouldDeps) { _this.normalizeDeps(dep.shouldDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!shouldDepIndex[key]) { shouldDepIndex[key] = true; nd.key = key; shouldDeps.push(nd); } }); } if (dep.noDeps) { _this.normalizeDeps(dep.noDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); nd.key = key; removeFromDeps(nd, mustDepIndex, mustDeps); removeFromDeps(nd, shouldDepIndex, shouldDeps); }); } } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!dep.tech) {··· if (dep.mustDeps) { _this.normalizeDeps(dep.mustDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!mustDepIndex[key]) { mustDepIndex[key] = true; nd.key = key; mustDeps.push(nd); } }); } if (dep.shouldDeps) { _this.normalizeDeps(dep.shouldDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!shouldDepIndex[key]) { shouldDepIndex[key] = true; nd.key = key; shouldDeps.push(nd); } }); } if (dep.noDeps) { _this.normalizeDeps(dep.noDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); nd.key = key; removeFromDeps(nd, mustDepIndex, mustDeps); removeFromDeps(nd, shouldDepIndex, shouldDeps); }); } } |
| ✗ Negative was not executed (else) | }··· }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.mustDeps) {··· _this.normalizeDeps(dep.mustDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!mustDepIndex[key]) { mustDepIndex[key] = true; nd.key = key; mustDeps.push(nd); } }); } |
| ✗ Negative was not executed (else) | }··· if (dep.shouldDeps) { |
| Function (anonymous_228) | |
|---|---|
| ✗ Was not called | _this.normalizeDeps(dep.mustDeps, decl.name, decl.elem).forEach(function (nd) {··· var key = declKey(nd); if (!mustDepIndex[key]) { mustDepIndex[key] = true; nd.key = key; mustDeps.push(nd); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!mustDepIndex[key]) {··· mustDepIndex[key] = true; nd.key = key; mustDeps.push(nd); } |
| ✗ Negative was not executed (else) | }··· }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.shouldDeps) {··· _this.normalizeDeps(dep.shouldDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); if (!shouldDepIndex[key]) { shouldDepIndex[key] = true; nd.key = key; shouldDeps.push(nd); } }); } |
| ✗ Negative was not executed (else) | }··· if (dep.noDeps) { |
| Function (anonymous_229) | |
|---|---|
| ✗ Was not called | _this.normalizeDeps(dep.shouldDeps, decl.name, decl.elem).forEach(function (nd) {··· var key = declKey(nd); if (!shouldDepIndex[key]) { shouldDepIndex[key] = true; nd.key = key; shouldDeps.push(nd); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!shouldDepIndex[key]) {··· shouldDepIndex[key] = true; nd.key = key; shouldDeps.push(nd); } |
| ✗ Negative was not executed (else) | }··· }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dep.noDeps) {··· _this.normalizeDeps(dep.noDeps, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); nd.key = key; removeFromDeps(nd, mustDepIndex, mustDeps); removeFromDeps(nd, shouldDepIndex, shouldDeps); }); } |
| ✗ Negative was not executed (else) | }··· } |
| Function (anonymous_230) | |
|---|---|
| ✗ Was not called | _this.normalizeDeps(dep.noDeps, decl.name, decl.elem).forEach(function (nd) {··· var key = declKey(nd); nd.key = key; removeFromDeps(nd, mustDepIndex, mustDeps); removeFromDeps(nd, shouldDepIndex, shouldDeps); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (file.suffix === 'deps.yaml') {··· var depYamlStructure = yaml.safeLoad(depContent, { filename: file.fullname, strict: true }); if (!Array.isArray(depYamlStructure)) { throw new Error('Invalid yaml deps structure at: ' + file.fullname); } _this.normalizeDeps(depYamlStructure, decl.name, decl.elem).forEach(function (nd) { var key = declKey(nd); var index; var depList; if (nd.required) { index = mustDepIndex; depList = mustDeps; } else { index = shouldDepIndex; depList = shouldDeps; } if (!index[key]) { index[key] = true; nd.key = key; depList.push(nd); } }); } |
| ✗ Negative was not executed (else) | }··· if (files.length > 0) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!Array.isArray(depYamlStructure)) {··· throw new Error('Invalid yaml deps structure at: ' + file.fullname); } |
| ✗ Negative was not executed (else) | }··· _this.normalizeDeps(depYamlStructure, decl.name, decl.elem).forEach(function (nd) { |
| Function (anonymous_231) | |
|---|---|
| ✗ Was not called | _this.normalizeDeps(depYamlStructure, decl.name, decl.elem).forEach(function (nd) {··· var key = declKey(nd); var index; var depList; if (nd.required) { index = mustDepIndex; depList = mustDeps; } else { index = shouldDepIndex; depList = shouldDeps; } if (!index[key]) { index[key] = true; nd.key = key; depList.push(nd); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (nd.required) {··· index = mustDepIndex; depList = mustDeps; } else { |
| ✗ Negative was not executed (else) | } else {··· index = shouldDepIndex; depList = shouldDeps; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!index[key]) {··· index[key] = true; nd.key = key; depList.push(nd); } |
| ✗ Negative was not executed (else) | }··· }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (files.length > 0) {··· return keepWorking(files.shift()); } else { |
| ✗ Negative was not executed (else) | } else {··· return null; } |
| Function (anonymous_232) | |
|---|---|
| ✗ Was not called | }).fail(function (err) {··· if (err instanceof DepsError) { err.message += ' in file "' + file.fullname + '"'; } throw err; }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (err instanceof DepsError) {··· err.message += ' in file "' + file.fullname + '"'; } |
| ✗ Negative was not executed (else) | }··· throw err; |
| Function removeFromDeps | |
|---|---|
| ✗ Was not called | function removeFromDeps(decl, index, list) {··· if (index[decl.key]) { for (var i = 0, l = list.length; i < l; i++) { if (list[i].key === decl.key) { return list.splice(i, 1); } } } else { index[decl.key] = true; } return null; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (index[decl.key]) {··· for (var i = 0, l = list.length; i < l; i++) { if (list[i].key === decl.key) { return list.splice(i, 1); } } } else { |
| ✗ Negative was not executed (else) | } else {··· index[decl.key] = true; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (list[i].key === decl.key) {··· return list.splice(i, 1); } |
| ✗ Negative was not executed (else) | }··· } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (files.length > 0) {··· return keepWorking(files.shift()).then(function () { return result; }); } else { |
| ✗ Negative was not executed (else) | } else {··· return Vow.fulfill(result); } |
| Function (anonymous_234) | |
|---|---|
| ✗ Was not called | return keepWorking(files.shift()).then(function () {··· return result; }); |
| Function (anonymous_235) | |
|---|---|
| ✗ Was not called | addBlock: function (blockName, modName, modVal) {··· if (modName) { this.addDecl({ name: blockName, modName: modName, modVal: modVal }); } else { this.addDecl({ name: blockName }); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (modName) {··· this.addDecl({ name: blockName, modName: modName, modVal: modVal }); } else { |
| ✗ Negative was not executed (else) | } else {··· this.addDecl({ name: blockName }); } |
| Function (anonymous_236) | |
|---|---|
| ✗ Was not called | addElem: function (blockName, elemName, modName, modVal) {··· if (modName) { return this.addDecl({ name: blockName, elem: elemName, modName: modName, modVal: modVal }); } else { return this.addDecl({ name: blockName, elem: elemName }); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (modName) {··· return this.addDecl({ name: blockName, elem: elemName, modName: modName, modVal: modVal }); } else { |
| ✗ Negative was not executed (else) | } else {··· return this.addDecl({ name: blockName, elem: elemName }); } |
| Function (anonymous_237) | |
|---|---|
| ✗ Was not called | addDecl: function (decl) {··· var _this = this; var key = declKey(decl); if (this.declarationIndex[key]) { return null; } this.declarations.push(decl); this.declarationIndex[key] = decl; return this.getDeps(decl).then(function (deps) { decl.key = key; decl.deps = {}; decl.depCount = 0; return _this.addDecls(deps.mustDeps, function (dep) { decl.deps[dep.key] = true; decl.depCount++; }).then(function () { return _this.addDecls(deps.shouldDeps); }); }); }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this.declarationIndex[key]) {··· return null; } |
| ✗ Negative was not executed (else) | }··· this.declarations.push(decl); |
| Function (anonymous_238) | |
|---|---|
| ✗ Was not called | return this.getDeps(decl).then(function (deps) {··· decl.key = key; decl.deps = {}; decl.depCount = 0; return _this.addDecls(deps.mustDeps, function (dep) { decl.deps[dep.key] = true; decl.depCount++; }).then(function () { return _this.addDecls(deps.shouldDeps); }); }); |
| Function (anonymous_239) | |
|---|---|
| ✗ Was not called | return _this.addDecls(deps.mustDeps, function (dep) {··· decl.deps[dep.key] = true; decl.depCount++; }).then(function () { |
| Function (anonymous_240) | |
|---|---|
| ✗ Was not called | }).then(function () {··· return _this.addDecls(deps.shouldDeps); }); |
| Function (anonymous_241) | |
|---|---|
| ✗ Was not called | addDecls: function (decls, preCallback) {··· var promise = Vow.fulfill(); var _this = this; decls.forEach(function (decl) { promise = promise.then(function () { if (preCallback) { preCallback(decl); } return _this.addDecl(decl); }); }); return promise; }, |
| Function (anonymous_242) | |
|---|---|
| ✗ Was not called | decls.forEach(function (decl) {··· promise = promise.then(function () { if (preCallback) { preCallback(decl); } return _this.addDecl(decl); }); }); |
| Function (anonymous_243) | |
|---|---|
| ✗ Was not called | promise = promise.then(function () {··· if (preCallback) { preCallback(decl); } return _this.addDecl(decl); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (preCallback) {··· preCallback(decl); } |
| ✗ Negative was not executed (else) | }··· return _this.addDecl(decl); |
| Function (anonymous_244) | |
|---|---|
| ✗ Was not called | resolve: function () {··· var items = this.declarations.slice(0); var result = []; var hasChanges = true; var newItems; while (hasChanges) { newItems = []; hasChanges = false; for (var i = 0, l = items.length; i < l; i++) { var decl = items[i]; if (decl.depCount === 0) { hasChanges = true; for (var j = 0; j < l; j++) { var subDecl = items[j]; if (subDecl.deps[decl.key]) { delete subDecl.deps[decl.key]; subDecl.depCount--; } } var item = { block: decl.name }; if (decl.elem) { item.elem = decl.elem; } if (decl.modName) { item.mod = decl.modName; if (decl.hasOwnProperty('modVal')) { item.val = decl.modVal; } } result.push(item); } else { newItems.push(decl); } } items = newItems; } if (items.length) { var errorMessage = items.map(function (item) { return item.key + ' <- ' + Object.keys(item.deps).join(', '); }); throw Error('Unresolved deps: \n' + errorMessage.join('\n')); } return result; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (decl.depCount === 0) {··· hasChanges = true; for (var j = 0; j < l; j++) { var subDecl = items[j]; if (subDecl.deps[decl.key]) { delete subDecl.deps[decl.key]; subDecl.depCount--; } } var item = { block: decl.name }; if (decl.elem) { item.elem = decl.elem; } if (decl.modName) { item.mod = decl.modName; if (decl.hasOwnProperty('modVal')) { item.val = decl.modVal; } } result.push(item); } else { |
| ✗ Negative was not executed (else) | } else {··· newItems.push(decl); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (subDecl.deps[decl.key]) {··· delete subDecl.deps[decl.key]; subDecl.depCount--; } |
| ✗ Negative was not executed (else) | }··· } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (decl.elem) {··· item.elem = decl.elem; } |
| ✗ Negative was not executed (else) | }··· if (decl.modName) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (decl.modName) {··· item.mod = decl.modName; if (decl.hasOwnProperty('modVal')) { item.val = decl.modVal; } } |
| ✗ Negative was not executed (else) | }··· result.push(item); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (decl.hasOwnProperty('modVal')) {··· item.val = decl.modVal; } |
| ✗ Negative was not executed (else) | }··· } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (items.length) {··· var errorMessage = items.map(function (item) { return item.key + ' <- ' + Object.keys(item.deps).join(', '); }); throw Error('Unresolved deps: \n' + errorMessage.join('\n')); } |
| ✗ Negative was not executed (else) | }··· return result; |
| Function (anonymous_245) | |
|---|---|
| ✗ Was not called | var errorMessage = items.map(function (item) {··· return item.key + ' <- ' + Object.keys(item.deps).join(', '); }); |
| Function declKey | |
|---|---|
| ✗ Was not called | function declKey(decl) {··· return decl.name + (decl.elem ? '__' + decl.elem : '') + (decl.modName ? '_' + decl.modName + (decl.modVal ? '_' + decl.modVal : '') : ''); } |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return decl.name + (decl.elem ? '__' + decl.elem : '') + |
| ✗ Negative was not returned (: ...) | return decl.name + (decl.elem ? '__' + decl.elem : '') + |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | (decl.modName ? '_' + decl.modName + (decl.modVal ? '_' + decl.modVal : '') : ''); |
| ✗ Negative was not returned (: ...) | (decl.modName ? '_' + decl.modName + (decl.modVal ? '_' + decl.modVal : '') : ''); |
| Branch ConditionalExpression | |
| ✗ Positive was not returned (? ...) | (decl.modName ? '_' + decl.modName + (decl.modVal ? '_' + decl.modVal : '') : ''); |
| ✗ Negative was not returned (: ...) | (decl.modName ? '_' + decl.modName + (decl.modVal ? '_' + decl.modVal : '') : ''); |
| Function (anonymous_247) | |
|---|---|
| ✗ Was not called | preprocessFile: function (sourceFilename, destFilename, freeze, minimize, tech) {··· var opts = { input: sourceFilename, output: destFilename, freeze: freeze, minimize: minimize }; if (tech) { opts.tech = tech; } return Vow.when(borschik.api(opts)); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (tech) {··· opts.tech = tech; } |
| ✗ Negative was not executed (else) | }··· return Vow.when(borschik.api(opts)); |
| Function (anonymous_248) | |
|---|---|
| ✓ Was called | __constructor: function () {··· this._buildCssRelativeUrl = function (url) { return url; }; }, |
| Function (anonymous_249) | |
|---|---|
| ✗ Was not called | this._buildCssRelativeUrl = function (url) {··· return url; }; |
| Function (anonymous_250) | |
|---|---|
| ✓ Was called | setCssRelativeUrlBuilder: function (builder) {··· this._buildCssRelativeUrl = builder; }, |
| Function (anonymous_251) | |
|---|---|
| ✓ Was called | preprocess: function (data, filename) {··· return this._processIncludes(this._processUrls(data, filename), filename); }, |
| Function (anonymous_252) | |
|---|---|
| ✗ Was not called | preprocessIncludes: function (data, filename) {··· return this._processIncludes(data, filename); }, |
| Function (anonymous_253) | |
|---|---|
| ✓ Was called | _processUrls: function (data, filename) {··· var _this = this; return data .replace(/(?:@import\s*)?url\(('[^']+'|"[^"]+"|[^'")]+)\)/g, function (s, url) { if (s.indexOf('@import') === 0) { return s; } // Тип кавычки var q = ''; var firstChar = url.charAt(0); if (firstChar === '\'' || firstChar === '"') { url = url.substr(1, url.length - 2); q = firstChar; } return 'url(' + q + _this._resolveCssUrl(url, filename) + q + ')'; }).replace(/src=[']?([^',\)]+)[']?/g, function (s, url) { return 'src=\'' + _this._resolveCssUrl(url, filename) + '\''; }); }, |
| Function (anonymous_254) | |
|---|---|
| ✓ Was called | .replace(/(?:@import\s*)?url\(('[^']+'|"[^"]+"|[^'")]+)\)/g, function (s, url) {··· if (s.indexOf('@import') === 0) { return s; } // Тип кавычки var q = ''; var firstChar = url.charAt(0); if (firstChar === '\'' || firstChar === '"') { url = url.substr(1, url.length - 2); q = firstChar; } return 'url(' + q + _this._resolveCssUrl(url, filename) + q + ')'; }).replace(/src=[']?([^',\)]+)[']?/g, function (s, url) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (s.indexOf('@import') === 0) {··· return s; } |
| ✓ Negative was executed (else) | }··· // Тип кавычки |
| Branch IfStatement | |
|---|---|
| ✓ Positive was executed (if) | if (firstChar === '\'' || firstChar === '"') {··· url = url.substr(1, url.length - 2); q = firstChar; } |
| ✓ Negative was executed (else) | }··· return 'url(' + q + _this._resolveCssUrl(url, filename) + q + ')'; |
| Branch LogicalExpression | |
| ✓ Was returned | if (firstChar === '\'' || firstChar === '"') { |
| ✓ Was returned | if (firstChar === '\'' || firstChar === '"') { |
| Function (anonymous_255) | |
|---|---|
| ✗ Was not called | }).replace(/src=[']?([^',\)]+)[']?/g, function (s, url) {··· return 'src=\'' + _this._resolveCssUrl(url, filename) + '\''; }); |
| Function (anonymous_256) | |
|---|---|
| ✓ Was called | _resolveCssUrl: function (url, filename) {··· if (url.substr(0, 5) === 'data:' || url.substr(0, 2) === '//' || ~url.indexOf('http://') || ~url.indexOf('https://') ) { return url; } else { return this._buildCssRelativeUrl(url, filename); } }, |
| Branch IfStatement | |
|---|---|
| ✓ Positive was executed (if) | ) {··· return url; } else { |
| ✓ Negative was executed (else) | } else {··· return this._buildCssRelativeUrl(url, filename); } |
| Branch LogicalExpression | |
| ✓ Was returned | ~url.indexOf('https://') |
| ✓ Was returned | if (url.substr(0, 5) === 'data:' ||··· url.substr(0, 2) === '//' || ~url.indexOf('http://') || |
| Branch LogicalExpression | |
| ✓ Was returned | ~url.indexOf('http://') || |
| ✓ Was returned | if (url.substr(0, 5) === 'data:' ||··· url.substr(0, 2) === '//' || |
| Branch LogicalExpression | |
| ✓ Was returned | url.substr(0, 2) === '//' || |
| ✓ Was returned | if (url.substr(0, 5) === 'data:' || |
| Function (anonymous_257) | |
|---|---|
| ✓ Was called | _processIncludes: function (data, filename) {··· var _this = this; var filesToLoad = {}; var regex = /@import\s*(?:url\()?["']?([^"'\)]+)["']?(?:\))?\s*;/g; var match; var loadPromises = []; function addLoadPromise (url) { var includedFilename = path.resolve(path.dirname(filename), url); loadPromises.push(vowFs.read(includedFilename, 'utf8').then(function (data) { return _this.preprocess(data, includedFilename).then(function (preprocessedData) { filesToLoad[url] = preprocessedData; }); })); } while (!!(match = regex.exec(data))) { addLoadPromise(match[1]); } return Vow.all(loadPromises).then(function () { return data.replace(/@import\s*(?:url\()?["']?([^"'\)]+)["']?(?:\))?\s*;/g, function (s, url) { var pre = '/* ' + url + ': begin */ /**/\n'; var post = '\n/* ' + url + ': end */ /**/\n'; return pre + ' ' + filesToLoad[url].replace(/\n/g, '\n ') + post; }); }); } |
| Function addLoadPromise | |
|---|---|
| ✗ Was not called | function addLoadPromise (url) {··· var includedFilename = path.resolve(path.dirname(filename), url); loadPromises.push(vowFs.read(includedFilename, 'utf8').then(function (data) { return _this.preprocess(data, includedFilename).then(function (preprocessedData) { filesToLoad[url] = preprocessedData; }); })); } |
| Function (anonymous_259) | |
|---|---|
| ✗ Was not called | loadPromises.push(vowFs.read(includedFilename, 'utf8').then(function (data) {··· return _this.preprocess(data, includedFilename).then(function (preprocessedData) { filesToLoad[url] = preprocessedData; }); })); |
| Function (anonymous_260) | |
|---|---|
| ✗ Was not called | return _this.preprocess(data, includedFilename).then(function (preprocessedData) {··· filesToLoad[url] = preprocessedData; }); |
| Function (anonymous_261) | |
|---|---|
| ✓ Was called | return Vow.all(loadPromises).then(function () {··· return data.replace(/@import\s*(?:url\()?["']?([^"'\)]+)["']?(?:\))?\s*;/g, function (s, url) { var pre = '/* ' + url + ': begin */ /**/\n'; var post = '\n/* ' + url + ': end */ /**/\n'; return pre + ' ' + filesToLoad[url].replace(/\n/g, '\n ') + post; }); }); |
| Function (anonymous_262) | |
|---|---|
| ✗ Was not called | return data.replace(/@import\s*(?:url\()?["']?([^"'\)]+)["']?(?:\))?\s*;/g, function (s, url) {··· var pre = '/* ' + url + ': begin */ /**/\n'; var post = '\n/* ' + url + ': end */ /**/\n'; return pre + ' ' + filesToLoad[url].replace(/\n/g, '\n ') + post; }); |
| Function (anonymous_263) | |
|---|---|
| ✗ Was not called | .builder(function (chunkFiles) {··· return Vow.when(this.getChunks(chunkFiles)).then(function (items) { return 'module.exports = ' + JSON.stringify(items) + ';'; }); }) |
| Function (anonymous_264) | |
|---|---|
| ✗ Was not called | return Vow.when(this.getChunks(chunkFiles)).then(function (items) {··· return 'module.exports = ' + JSON.stringify(items) + ';'; }); |
| Function (anonymous_265) | |
|---|---|
| ✗ Was not called | getChunks: function (sourceFiles) {··· var _this = this; return Vow.all(sourceFiles.map(function (sourceFile) { return vowFs.read(sourceFile.fullname, 'utf8').then(function (data) { return _this.processChunk(sourceFile.fullname, data); }); })); }, |
| Function (anonymous_266) | |
|---|---|
| ✗ Was not called | return Vow.all(sourceFiles.map(function (sourceFile) {··· return vowFs.read(sourceFile.fullname, 'utf8').then(function (data) { return _this.processChunk(sourceFile.fullname, data); }); })); |
| Function (anonymous_267) | |
|---|---|
| ✗ Was not called | return vowFs.read(sourceFile.fullname, 'utf8').then(function (data) {··· return _this.processChunk(sourceFile.fullname, data); }); |
| Function (anonymous_268) | |
|---|---|
| ✗ Was not called | processChunk: function (filename, data) {··· return Vow.when(this.processChunkData(filename, data)).then(function (data) { var hash = crypto.createHash('sha1'); hash.update(data); return { fullname: filename, data: data, hash: hash.digest('base64') }; }); }, |
| Function (anonymous_269) | |
|---|---|
| ✗ Was not called | return Vow.when(this.processChunkData(filename, data)).then(function (data) {··· var hash = crypto.createHash('sha1'); hash.update(data); return { fullname: filename, data: data, hash: hash.digest('base64') }; }); |
| Function (anonymous_270) | |
|---|---|
| ✗ Was not called | processChunkData: function (filename, data) {··· return data; } |
| Function (anonymous_271) | |
|---|---|
| ✗ Was not called | __constructor: function (path, schemeBuilder) {··· this._path = path; this.blocks = {}; this._loadPromise = null; this._schemeBuilder = schemeBuilder; }, |
| Function (anonymous_272) | |
|---|---|
| ✗ Was not called | loadFromCache: function (data) {··· this.blocks = data; this._loadPromise = Vow.fulfill(this); }, |
| Function (anonymous_273) | |
|---|---|
| ✗ Was not called | getBlocks: function () {··· return this.blocks; }, |
| Function (anonymous_274) | |
|---|---|
| ✗ Was not called | hasBlock: function (blockName) {··· return this.blocks[blockName]; }, |
| Function (anonymous_275) | |
|---|---|
| ✗ Was not called | getPath: function () {··· return this._path; }, |
| Function (anonymous_276) | |
|---|---|
| ✗ Was not called | _processFile: function (filename, stat, parentElementName, elementName, modName) {··· var requiredBaseNameWithoutExt = (parentElementName ? parentElementName + '__' : '') + elementName + (modName ? '_' + modName : ''); var baseName = filename.split('/').slice(-1)[0]; var baseNameParts = baseName.split('.'); var baseNameWithoutExt = stat.isDirectory() ? baseNameParts.slice(0, baseNameParts.length - 1).join('.') : baseNameParts[0]; var rl = requiredBaseNameWithoutExt.length; var modVal; var processFile = baseNameWithoutExt.indexOf(requiredBaseNameWithoutExt) === 0 && ( modName ? (rl === baseNameWithoutExt.length) || baseNameWithoutExt.charAt(rl) === '_' : baseNameWithoutExt === requiredBaseNameWithoutExt ); if (!processFile && !modName && !parentElementName) { var baseNameModParts = baseNameWithoutExt.split('_'); if (baseNameModParts.length === 2 && baseNameModParts[0] === requiredBaseNameWithoutExt) { processFile = true; modName = 'view'; modVal = baseNameModParts[1]; } } if (processFile) { var suffix = stat.isDirectory() ? baseNameParts.pop() : baseNameParts.slice(1).join('.'); var fileInfo = { name: baseName, fullname: filename, suffix: suffix, mtime: stat.mtime.getTime(), isDirectory: stat.isDirectory() }; if (fileInfo.isDirectory) { fileInfo.files = filterFiles(fs.readdirSync(filename)).map(function (subFilename) { var subFullname = filename + '/' + subFilename; var subStat = fs.statSync(subFullname); return { name: subFilename, fullname: subFullname, suffix: subFilename.split('.').slice(1).join('.'), mtime: subStat.mtime.getTime(), isDirectory: subStat.isDirectory() }; }); } var blockName = parentElementName || elementName; var block = this.blocks[blockName] || (this.blocks[blockName] = { name: blockName, files: [], dirs: [], elements: {}, mods: {} }); var destElement; if (parentElementName) { destElement = block.elements[elementName] || (block.elements[elementName] = { name: elementName, files: [], dirs: [], mods: {} }); } else { destElement = block; } var collectionKey = fileInfo.isDirectory ? 'dirs' : 'files'; if (modName) { if (!modVal) { if (rl !== baseNameWithoutExt.length) { modVal = baseNameWithoutExt.substr(rl + 1); } else { modVal = ''; } } if (modName === 'view' && modVal === 'view') { modVal = ''; } var mod = destElement.mods[modName] || (destElement.mods[modName] = {}); var modValueFiles = (mod[modVal] || (mod[modVal] = {files: [], dirs: []}))[collectionKey]; modValueFiles.push(fileInfo); } else { destElement[collectionKey].push(fileInfo); } } }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var requiredBaseNameWithoutExt = (parentElementName ? parentElementName + '__' : '') + |
| ✗ Negative was not returned (: ...) | var requiredBaseNameWithoutExt = (parentElementName ? parentElementName + '__' : '') + |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | elementName + (modName ? '_' + modName : ''); |
| ✗ Negative was not returned (: ...) | elementName + (modName ? '_' + modName : ''); |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | baseNameParts.slice(0, baseNameParts.length - 1).join('.') : |
| ✗ Negative was not returned (: ...) | baseNameParts[0]; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | modName ?··· (rl === baseNameWithoutExt.length) || baseNameWithoutExt.charAt(rl) === '_' : baseNameWithoutExt === requiredBaseNameWithoutExt |
| ✗ Was not returned | var processFile = baseNameWithoutExt.indexOf(requiredBaseNameWithoutExt) === 0 && ( |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | (rl === baseNameWithoutExt.length) || baseNameWithoutExt.charAt(rl) === '_' : |
| ✗ Negative was not returned (: ...) | baseNameWithoutExt === requiredBaseNameWithoutExt |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (rl === baseNameWithoutExt.length) || baseNameWithoutExt.charAt(rl) === '_' : |
| ✗ Was not returned | (rl === baseNameWithoutExt.length) || baseNameWithoutExt.charAt(rl) === '_' : |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!processFile && !modName && !parentElementName) {··· var baseNameModParts = baseNameWithoutExt.split('_'); if (baseNameModParts.length === 2 && baseNameModParts[0] === requiredBaseNameWithoutExt) { processFile = true; modName = 'view'; modVal = baseNameModParts[1]; } } |
| ✗ Negative was not executed (else) | }··· if (processFile) { |
| Branch LogicalExpression | |
| ✗ Was not returned | if (!processFile && !modName && !parentElementName) { |
| ✗ Was not returned | if (!processFile && !modName && !parentElementName) { |
| Branch LogicalExpression | |
| ✗ Was not returned | if (!processFile && !modName && !parentElementName) { |
| ✗ Was not returned | if (!processFile && !modName && !parentElementName) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (baseNameModParts.length === 2 && baseNameModParts[0] === requiredBaseNameWithoutExt) {··· processFile = true; modName = 'view'; modVal = baseNameModParts[1]; } |
| ✗ Negative was not executed (else) | }··· } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (baseNameModParts.length === 2 && baseNameModParts[0] === requiredBaseNameWithoutExt) { |
| ✗ Was not returned | if (baseNameModParts.length === 2 && baseNameModParts[0] === requiredBaseNameWithoutExt) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (processFile) {··· var suffix = stat.isDirectory() ? baseNameParts.pop() : baseNameParts.slice(1).join('.'); var fileInfo = { name: baseName, fullname: filename, suffix: suffix, mtime: stat.mtime.getTime(), isDirectory: stat.isDirectory() }; if (fileInfo.isDirectory) { fileInfo.files = filterFiles(fs.readdirSync(filename)).map(function (subFilename) { var subFullname = filename + '/' + subFilename; var subStat = fs.statSync(subFullname); return { name: subFilename, fullname: subFullname, suffix: subFilename.split('.').slice(1).join('.'), mtime: subStat.mtime.getTime(), isDirectory: subStat.isDirectory() }; }); } var blockName = parentElementName || elementName; var block = this.blocks[blockName] || (this.blocks[blockName] = { name: blockName, files: [], dirs: [], elements: {}, mods: {} }); var destElement; if (parentElementName) { destElement = block.elements[elementName] || (block.elements[elementName] = { name: elementName, files: [], dirs: [], mods: {} }); } else { destElement = block; } var collectionKey = fileInfo.isDirectory ? 'dirs' : 'files'; if (modName) { if (!modVal) { if (rl !== baseNameWithoutExt.length) { modVal = baseNameWithoutExt.substr(rl + 1); } else { modVal = ''; } } if (modName === 'view' && modVal === 'view') { modVal = ''; } var mod = destElement.mods[modName] || (destElement.mods[modName] = {}); var modValueFiles = (mod[modVal] || (mod[modVal] = {files: [], dirs: []}))[collectionKey]; modValueFiles.push(fileInfo); } else { destElement[collectionKey].push(fileInfo); } } |
| ✗ Negative was not executed (else) | }··· }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var suffix = stat.isDirectory() ? baseNameParts.pop() : baseNameParts.slice(1).join('.'); |
| ✗ Negative was not returned (: ...) | var suffix = stat.isDirectory() ? baseNameParts.pop() : baseNameParts.slice(1).join('.'); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (fileInfo.isDirectory) {··· fileInfo.files = filterFiles(fs.readdirSync(filename)).map(function (subFilename) { var subFullname = filename + '/' + subFilename; var subStat = fs.statSync(subFullname); return { name: subFilename, fullname: subFullname, suffix: subFilename.split('.').slice(1).join('.'), mtime: subStat.mtime.getTime(), isDirectory: subStat.isDirectory() }; }); } |
| ✗ Negative was not executed (else) | }··· var blockName = parentElementName || elementName; |
| Function (anonymous_277) | |
|---|---|
| ✗ Was not called | fileInfo.files = filterFiles(fs.readdirSync(filename)).map(function (subFilename) {··· var subFullname = filename + '/' + subFilename; var subStat = fs.statSync(subFullname); return { name: subFilename, fullname: subFullname, suffix: subFilename.split('.').slice(1).join('.'), mtime: subStat.mtime.getTime(), isDirectory: subStat.isDirectory() }; }); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var blockName = parentElementName || elementName; |
| ✗ Was not returned | var blockName = parentElementName || elementName; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var block = this.blocks[blockName] || (this.blocks[blockName] = {··· name: blockName, files: [], dirs: [], elements: {}, mods: {} }); |
| ✗ Was not returned | var block = this.blocks[blockName] || (this.blocks[blockName] = { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (parentElementName) {··· destElement = block.elements[elementName] || (block.elements[elementName] = { name: elementName, files: [], dirs: [], mods: {} }); } else { |
| ✗ Negative was not executed (else) | } else {··· destElement = block; } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | destElement = block.elements[elementName] || (block.elements[elementName] = {··· name: elementName, files: [], dirs: [], mods: {} }); |
| ✗ Was not returned | destElement = block.elements[elementName] || (block.elements[elementName] = { |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var collectionKey = fileInfo.isDirectory ? 'dirs' : 'files'; |
| ✗ Negative was not returned (: ...) | var collectionKey = fileInfo.isDirectory ? 'dirs' : 'files'; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (modName) {··· if (!modVal) { if (rl !== baseNameWithoutExt.length) { modVal = baseNameWithoutExt.substr(rl + 1); } else { modVal = ''; } } if (modName === 'view' && modVal === 'view') { modVal = ''; } var mod = destElement.mods[modName] || (destElement.mods[modName] = {}); var modValueFiles = (mod[modVal] || (mod[modVal] = {files: [], dirs: []}))[collectionKey]; modValueFiles.push(fileInfo); } else { |
| ✗ Negative was not executed (else) | } else {··· destElement[collectionKey].push(fileInfo); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!modVal) {··· if (rl !== baseNameWithoutExt.length) { modVal = baseNameWithoutExt.substr(rl + 1); } else { modVal = ''; } } |
| ✗ Negative was not executed (else) | }··· if (modName === 'view' && modVal === 'view') { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (rl !== baseNameWithoutExt.length) {··· modVal = baseNameWithoutExt.substr(rl + 1); } else { |
| ✗ Negative was not executed (else) | } else {··· modVal = ''; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (modName === 'view' && modVal === 'view') {··· modVal = ''; } |
| ✗ Negative was not executed (else) | }··· var mod = destElement.mods[modName] || (destElement.mods[modName] = {}); |
| Branch LogicalExpression | |
| ✗ Was not returned | if (modName === 'view' && modVal === 'view') { |
| ✗ Was not returned | if (modName === 'view' && modVal === 'view') { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var mod = destElement.mods[modName] || (destElement.mods[modName] = {}); |
| ✗ Was not returned | var mod = destElement.mods[modName] || (destElement.mods[modName] = {}); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var modValueFiles = (mod[modVal] || (mod[modVal] = {files: [], dirs: []}))[collectionKey]; |
| ✗ Was not returned | var modValueFiles = (mod[modVal] || (mod[modVal] = {files: [], dirs: []}))[collectionKey]; |
| Function (anonymous_278) | |
|---|---|
| ✗ Was not called | _loadMod: function (parentElementName, elementName, modName, modDirPath) {··· var _this = this; filterFiles(fs.readdirSync(modDirPath)).forEach(function (filename) { var fullname = modDirPath + '/' + filename; var stat = fs.statSync(fullname); _this._processFile(fullname, stat, parentElementName, elementName, modName); }); }, |
| Function (anonymous_279) | |
|---|---|
| ✗ Was not called | filterFiles(fs.readdirSync(modDirPath)).forEach(function (filename) {··· var fullname = modDirPath + '/' + filename; var stat = fs.statSync(fullname); _this._processFile(fullname, stat, parentElementName, elementName, modName); }); |
| Function (anonymous_280) | |
|---|---|
| ✗ Was not called | _loadElement: function (parentElementName, elementName, elementDirPath, containsElements) {··· var _this = this; var requiredBaseNameWithoutExt = (parentElementName ? parentElementName + '__' : '') + elementName; filterFiles(fs.readdirSync(elementDirPath)).forEach(function (filename) { var fullname = elementDirPath + '/' + filename; var stat = fs.statSync(fullname); if (stat.isDirectory()) { if (containsElements && filename.substr(0, 2) === '__') { _this._loadElement(elementName, filename.substr(2), fullname, false); } else if (filename.charAt(0) === '_') { _this._loadMod(parentElementName, elementName, filename.substr(1), fullname); } else if (filename.indexOf('.') !== -1 && filename.indexOf(requiredBaseNameWithoutExt + '.') === 0) { _this._processFile(fullname, stat, parentElementName, elementName); } else if (containsElements) { _this._loadElement(elementName, filename, fullname, false); } } else if (stat.isFile()) { _this._processFile(fullname, stat, parentElementName, elementName); } }); }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var requiredBaseNameWithoutExt = (parentElementName ? parentElementName + '__' : '') + elementName; |
| ✗ Negative was not returned (: ...) | var requiredBaseNameWithoutExt = (parentElementName ? parentElementName + '__' : '') + elementName; |
| Function (anonymous_281) | |
|---|---|
| ✗ Was not called | filterFiles(fs.readdirSync(elementDirPath)).forEach(function (filename) {··· var fullname = elementDirPath + '/' + filename; var stat = fs.statSync(fullname); if (stat.isDirectory()) { if (containsElements && filename.substr(0, 2) === '__') { _this._loadElement(elementName, filename.substr(2), fullname, false); } else if (filename.charAt(0) === '_') { _this._loadMod(parentElementName, elementName, filename.substr(1), fullname); } else if (filename.indexOf('.') !== -1 && filename.indexOf(requiredBaseNameWithoutExt + '.') === 0) { _this._processFile(fullname, stat, parentElementName, elementName); } else if (containsElements) { _this._loadElement(elementName, filename, fullname, false); } } else if (stat.isFile()) { _this._processFile(fullname, stat, parentElementName, elementName); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (stat.isDirectory()) {··· if (containsElements && filename.substr(0, 2) === '__') { _this._loadElement(elementName, filename.substr(2), fullname, false); } else if (filename.charAt(0) === '_') { _this._loadMod(parentElementName, elementName, filename.substr(1), fullname); } else if (filename.indexOf('.') !== -1 && filename.indexOf(requiredBaseNameWithoutExt + '.') === 0) { _this._processFile(fullname, stat, parentElementName, elementName); } else if (containsElements) { _this._loadElement(elementName, filename, fullname, false); } } else if (stat.isFile()) { |
| ✗ Negative was not executed (else) | } else if (stat.isFile()) {··· _this._processFile(fullname, stat, parentElementName, elementName); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (containsElements && filename.substr(0, 2) === '__') {··· _this._loadElement(elementName, filename.substr(2), fullname, false); } else if (filename.charAt(0) === '_') { |
| ✗ Negative was not executed (else) | } else if (filename.charAt(0) === '_') {··· _this._loadMod(parentElementName, elementName, filename.substr(1), fullname); } else if (filename.indexOf('.') !== -1 && filename.indexOf(requiredBaseNameWithoutExt + '.') === 0) { _this._processFile(fullname, stat, parentElementName, elementName); } else if (containsElements) { _this._loadElement(elementName, filename, fullname, false); } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (containsElements && filename.substr(0, 2) === '__') { |
| ✗ Was not returned | if (containsElements && filename.substr(0, 2) === '__') { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (filename.charAt(0) === '_') {··· _this._loadMod(parentElementName, elementName, filename.substr(1), fullname); } else if (filename.indexOf('.') !== -1 && filename.indexOf(requiredBaseNameWithoutExt + '.') === 0) { |
| ✗ Negative was not executed (else) | } else if (filename.indexOf('.') !== -1 && filename.indexOf(requiredBaseNameWithoutExt + '.') === 0) {··· _this._processFile(fullname, stat, parentElementName, elementName); } else if (containsElements) { _this._loadElement(elementName, filename, fullname, false); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (filename.indexOf('.') !== -1 && filename.indexOf(requiredBaseNameWithoutExt + '.') === 0) {··· _this._processFile(fullname, stat, parentElementName, elementName); } else if (containsElements) { |
| ✗ Negative was not executed (else) | } else if (containsElements) {··· _this._loadElement(elementName, filename, fullname, false); } |
| Branch LogicalExpression | |
| ✗ Was not returned | } else if (filename.indexOf('.') !== -1 && filename.indexOf(requiredBaseNameWithoutExt + '.') === 0) { |
| ✗ Was not returned | } else if (filename.indexOf('.') !== -1 && filename.indexOf(requiredBaseNameWithoutExt + '.') === 0) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (containsElements) {··· _this._loadElement(elementName, filename, fullname, false); } |
| ✗ Negative was not executed (else) | }··· } else if (stat.isFile()) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (stat.isFile()) {··· _this._processFile(fullname, stat, parentElementName, elementName); } |
| ✗ Negative was not executed (else) | }··· }); |
| Function (anonymous_282) | |
|---|---|
| ✗ Was not called | load: function () {··· if (this._loadPromise) { return this._loadPromise; } this._loadPromise = Vow.promise(); var _this = this; if (this._schemeBuilder) { var levelBuilder = new LevelBuilder(); Vow.when(this._schemeBuilder.buildLevel(this._path, levelBuilder)).then(function () { _this.blocks = levelBuilder.getBlocks(); _this._loadPromise.fulfill(_this); }); } else { var path = this._path; filterFiles(fs.readdirSync(path)).forEach(function (blockDir) { var blockDirPath = path + '/' + blockDir; if (fs.statSync(blockDirPath).isDirectory()) { _this._loadElement(null, blockDir, blockDirPath, true); } }); this._loadPromise.fulfill(this); } return this._loadPromise; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this._loadPromise) {··· return this._loadPromise; } |
| ✗ Negative was not executed (else) | }··· this._loadPromise = Vow.promise(); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this._schemeBuilder) {··· var levelBuilder = new LevelBuilder(); Vow.when(this._schemeBuilder.buildLevel(this._path, levelBuilder)).then(function () { _this.blocks = levelBuilder.getBlocks(); _this._loadPromise.fulfill(_this); }); } else { |
| ✗ Negative was not executed (else) | } else {··· var path = this._path; filterFiles(fs.readdirSync(path)).forEach(function (blockDir) { var blockDirPath = path + '/' + blockDir; if (fs.statSync(blockDirPath).isDirectory()) { _this._loadElement(null, blockDir, blockDirPath, true); } }); this._loadPromise.fulfill(this); } |
| Function (anonymous_283) | |
|---|---|
| ✗ Was not called | Vow.when(this._schemeBuilder.buildLevel(this._path, levelBuilder)).then(function () {··· _this.blocks = levelBuilder.getBlocks(); _this._loadPromise.fulfill(_this); }); |
| Function (anonymous_284) | |
|---|---|
| ✗ Was not called | filterFiles(fs.readdirSync(path)).forEach(function (blockDir) {··· var blockDirPath = path + '/' + blockDir; if (fs.statSync(blockDirPath).isDirectory()) { _this._loadElement(null, blockDir, blockDirPath, true); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (fs.statSync(blockDirPath).isDirectory()) {··· _this._loadElement(null, blockDir, blockDirPath, true); } |
| ✗ Negative was not executed (else) | }··· }); |
| Function filterFiles | |
|---|---|
| ✗ Was not called | function filterFiles(filenames) {··· return filenames.filter(function (filename) { return filename.charAt(0) !== '.'; }); } |
| Function (anonymous_286) | |
|---|---|
| ✗ Was not called | return filenames.filter(function (filename) {··· return filename.charAt(0) !== '.'; }); |
| Function (anonymous_287) | |
|---|---|
| ✗ Was not called | __constructor: function () {··· this._blocks = {}; }, |
| Function (anonymous_288) | |
|---|---|
| ✗ Was not called | addFile: function (filename, blockName, elemName, modName, modVal) {··· var baseName = filename.split('/').slice(-1)[0]; var baseNameParts = baseName.split('.'); var stat = fs.statSync(filename); var suffix = baseNameParts.slice(1).join('.'); var fileInfo = { name: baseName, fullname: filename, suffix: suffix, mtime: stat.mtime.getTime(), isDirectory: stat.isDirectory() }; if (fileInfo.isDirectory) { fileInfo.files = filterFiles(fs.readdirSync(filename)).map(function (subFilename) { var subFullname = filename + '/' + subFilename; var subStat = fs.statSync(subFullname); return { name: subFilename, fullname: subFullname, suffix: subFilename.split('.').slice(1).join('.'), mtime: subStat.mtime.getTime(), isDirectory: subStat.isDirectory() }; }); } var block = this._blocks[blockName] || (this._blocks[blockName] = { name: blockName, files: [], dirs: [], elements: {}, mods: {} }); var destElement; if (elemName) { destElement = block.elements[elemName] || (block.elements[elemName] = { name: elemName, files: [], dirs: [], mods: {} }); } else { destElement = block; } var collectionKey = fileInfo.isDirectory ? 'dirs' : 'files'; if (modName) { var mod = destElement.mods[modName] || (destElement.mods[modName] = {}); var modValueFiles = (mod[modVal] || (mod[modVal] = {files: [], dirs: []}))[collectionKey]; modValueFiles.push(fileInfo); } else { destElement[collectionKey].push(fileInfo); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (fileInfo.isDirectory) {··· fileInfo.files = filterFiles(fs.readdirSync(filename)).map(function (subFilename) { var subFullname = filename + '/' + subFilename; var subStat = fs.statSync(subFullname); return { name: subFilename, fullname: subFullname, suffix: subFilename.split('.').slice(1).join('.'), mtime: subStat.mtime.getTime(), isDirectory: subStat.isDirectory() }; }); } |
| ✗ Negative was not executed (else) | }··· var block = this._blocks[blockName] || (this._blocks[blockName] = { |
| Function (anonymous_289) | |
|---|---|
| ✗ Was not called | fileInfo.files = filterFiles(fs.readdirSync(filename)).map(function (subFilename) {··· var subFullname = filename + '/' + subFilename; var subStat = fs.statSync(subFullname); return { name: subFilename, fullname: subFullname, suffix: subFilename.split('.').slice(1).join('.'), mtime: subStat.mtime.getTime(), isDirectory: subStat.isDirectory() }; }); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var block = this._blocks[blockName] || (this._blocks[blockName] = {··· name: blockName, files: [], dirs: [], elements: {}, mods: {} }); |
| ✗ Was not returned | var block = this._blocks[blockName] || (this._blocks[blockName] = { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (elemName) {··· destElement = block.elements[elemName] || (block.elements[elemName] = { name: elemName, files: [], dirs: [], mods: {} }); } else { |
| ✗ Negative was not executed (else) | } else {··· destElement = block; } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | destElement = block.elements[elemName] || (block.elements[elemName] = {··· name: elemName, files: [], dirs: [], mods: {} }); |
| ✗ Was not returned | destElement = block.elements[elemName] || (block.elements[elemName] = { |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var collectionKey = fileInfo.isDirectory ? 'dirs' : 'files'; |
| ✗ Negative was not returned (: ...) | var collectionKey = fileInfo.isDirectory ? 'dirs' : 'files'; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (modName) {··· var mod = destElement.mods[modName] || (destElement.mods[modName] = {}); var modValueFiles = (mod[modVal] || (mod[modVal] = {files: [], dirs: []}))[collectionKey]; modValueFiles.push(fileInfo); } else { |
| ✗ Negative was not executed (else) | } else {··· destElement[collectionKey].push(fileInfo); } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var mod = destElement.mods[modName] || (destElement.mods[modName] = {}); |
| ✗ Was not returned | var mod = destElement.mods[modName] || (destElement.mods[modName] = {}); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var modValueFiles = (mod[modVal] || (mod[modVal] = {files: [], dirs: []}))[collectionKey]; |
| ✗ Was not returned | var modValueFiles = (mod[modVal] || (mod[modVal] = {files: [], dirs: []}))[collectionKey]; |
| Function (anonymous_290) | |
|---|---|
| ✗ Was not called | getBlocks: function () {··· return this._blocks; }, |
| Function (anonymous_291) | |
|---|---|
| ✗ Was not called | build: function () {··· return Vow.fulfill(); } |
| Function filterFiles | |
|---|---|
| ✗ Was not called | function filterFiles(filenames) {··· return filenames.filter(function (filename) { return filename.charAt(0) !== '.'; }); } |
| Function (anonymous_293) | |
|---|---|
| ✗ Was not called | return filenames.filter(function (filename) {··· return filename.charAt(0) !== '.'; }); |
| Function (anonymous_294) | |
|---|---|
| ✗ Was not called | __constructor: function (items) {··· this.items = items; }, |
| Function (anonymous_295) | |
|---|---|
| ✗ Was not called | getBlocks: function (blockName) {··· var block; var blocks = []; for (var i = 0, l = this.items.length; i < l; i++) { block = this.items[i].blocks[blockName]; if (block) { blocks.push(block); } } return blocks; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (block) {··· blocks.push(block); } |
| ✗ Negative was not executed (else) | }··· } |
| Function (anonymous_296) | |
|---|---|
| ✗ Was not called | getElems: function (blockName, elemName) {··· var block; var elements = []; for (var i = 0, l = this.items.length; i < l; i++) { block = this.items[i].blocks[blockName]; if (block && block.elements[elemName]) { elements.push(block.elements[elemName]); } } return elements; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (block && block.elements[elemName]) {··· elements.push(block.elements[elemName]); } |
| ✗ Negative was not executed (else) | }··· } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (block && block.elements[elemName]) { |
| ✗ Was not returned | if (block && block.elements[elemName]) { |
| Function (anonymous_297) | |
|---|---|
| ✗ Was not called | getBlockEntities: function (blockName, modName, modVal) {··· var block; var files = []; var dirs = []; var blocks = this.getBlocks(blockName); for (var i = 0, l = blocks.length; i < l; i++) { block = blocks[i]; if (modName) { if (block.mods[modName] && block.mods[modName][modVal || '']) { files = files.concat(block.mods[modName][modVal || ''].files); dirs = dirs.concat(block.mods[modName][modVal || ''].dirs); } } else { files = files.concat(block.files); dirs = dirs.concat(block.dirs); } } return {files: files, dirs: dirs}; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (modName) {··· if (block.mods[modName] && block.mods[modName][modVal || '']) { files = files.concat(block.mods[modName][modVal || ''].files); dirs = dirs.concat(block.mods[modName][modVal || ''].dirs); } } else { |
| ✗ Negative was not executed (else) | } else {··· files = files.concat(block.files); dirs = dirs.concat(block.dirs); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (block.mods[modName] && block.mods[modName][modVal || '']) {··· files = files.concat(block.mods[modName][modVal || ''].files); dirs = dirs.concat(block.mods[modName][modVal || ''].dirs); } |
| ✗ Negative was not executed (else) | }··· } else { |
| Branch LogicalExpression | |
| ✗ Was not returned | if (block.mods[modName] && block.mods[modName][modVal || '']) { |
| ✗ Was not returned | if (block.mods[modName] && block.mods[modName][modVal || '']) { |
| Branch LogicalExpression | |
| ✗ Was not returned | if (block.mods[modName] && block.mods[modName][modVal || '']) { |
| ✗ Was not returned | if (block.mods[modName] && block.mods[modName][modVal || '']) { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | files = files.concat(block.mods[modName][modVal || ''].files); |
| ✗ Was not returned | files = files.concat(block.mods[modName][modVal || ''].files); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | dirs = dirs.concat(block.mods[modName][modVal || ''].dirs); |
| ✗ Was not returned | dirs = dirs.concat(block.mods[modName][modVal || ''].dirs); |
| Function (anonymous_298) | |
|---|---|
| ✗ Was not called | getElemEntities: function (blockName, elemName, modName, modVal) {··· var elem; var files = []; var dirs = []; var elems = this.getElems(blockName, elemName); for (var i = 0, l = elems.length; i < l; i++) { elem = elems[i]; if (modName) { if (elem.mods[modName] && elem.mods[modName][modVal || '']) { files = files.concat(elem.mods[modName][modVal || ''].files); dirs = dirs.concat(elem.mods[modName][modVal || ''].dirs); } } else { files = files.concat(elem.files); dirs = dirs.concat(elem.dirs); } } return {files: files, dirs: dirs}; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (modName) {··· if (elem.mods[modName] && elem.mods[modName][modVal || '']) { files = files.concat(elem.mods[modName][modVal || ''].files); dirs = dirs.concat(elem.mods[modName][modVal || ''].dirs); } } else { |
| ✗ Negative was not executed (else) | } else {··· files = files.concat(elem.files); dirs = dirs.concat(elem.dirs); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (elem.mods[modName] && elem.mods[modName][modVal || '']) {··· files = files.concat(elem.mods[modName][modVal || ''].files); dirs = dirs.concat(elem.mods[modName][modVal || ''].dirs); } |
| ✗ Negative was not executed (else) | }··· } else { |
| Branch LogicalExpression | |
| ✗ Was not returned | if (elem.mods[modName] && elem.mods[modName][modVal || '']) { |
| ✗ Was not returned | if (elem.mods[modName] && elem.mods[modName][modVal || '']) { |
| Branch LogicalExpression | |
| ✗ Was not returned | if (elem.mods[modName] && elem.mods[modName][modVal || '']) { |
| ✗ Was not returned | if (elem.mods[modName] && elem.mods[modName][modVal || '']) { |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | files = files.concat(elem.mods[modName][modVal || ''].files); |
| ✗ Was not returned | files = files.concat(elem.mods[modName][modVal || ''].files); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | dirs = dirs.concat(elem.mods[modName][modVal || ''].dirs); |
| ✗ Was not returned | dirs = dirs.concat(elem.mods[modName][modVal || ''].dirs); |
| Function (anonymous_299) | |
|---|---|
| ✗ Was not called | getBlockFiles: function (blockName, modName, modVal) {··· return this.getBlockEntities(blockName, modName, modVal).files; }, |
| Function (anonymous_300) | |
|---|---|
| ✗ Was not called | getElemFiles: function (blockName, elemName, modName, modVal) {··· return this.getElemEntities(blockName, elemName, modName, modVal).files; }, |
| Function (anonymous_301) | |
|---|---|
| ✗ Was not called | getFilesByDecl: function (blockName, elemName, modName, modVal) {··· if (elemName) { return this.getElemFiles(blockName, elemName, modName, modVal); } else { return this.getBlockFiles(blockName, modName, modVal); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (elemName) {··· return this.getElemFiles(blockName, elemName, modName, modVal); } else { |
| ✗ Negative was not executed (else) | } else {··· return this.getBlockFiles(blockName, modName, modVal); } |
| Function (anonymous_302) | |
|---|---|
| ✗ Was not called | getFilesBySuffix: function (suffix) {··· var files = []; this.items.forEach(function (level) { var blocks = level.blocks; Object.keys(blocks).forEach(function (blockName) { files = files.concat(getFilesInElementBySuffix(blocks[blockName], suffix)); }); }); return files; }, |
| Function (anonymous_303) | |
|---|---|
| ✗ Was not called | this.items.forEach(function (level) {··· var blocks = level.blocks; Object.keys(blocks).forEach(function (blockName) { files = files.concat(getFilesInElementBySuffix(blocks[blockName], suffix)); }); }); |
| Function (anonymous_304) | |
|---|---|
| ✗ Was not called | Object.keys(blocks).forEach(function (blockName) {··· files = files.concat(getFilesInElementBySuffix(blocks[blockName], suffix)); }); |
| Function (anonymous_305) | |
|---|---|
| ✗ Was not called | getModValues: function (blockName, modName) {··· var modVals = []; this.items.forEach(function (level) { var blockInfo = level.blocks[blockName]; if (blockInfo && blockInfo.mods && blockInfo.mods[modName]) { modVals = modVals.concat(Object.keys(blockInfo.mods[modName])); } }); return modVals; } |
| Function (anonymous_306) | |
|---|---|
| ✗ Was not called | this.items.forEach(function (level) {··· var blockInfo = level.blocks[blockName]; if (blockInfo && blockInfo.mods && blockInfo.mods[modName]) { modVals = modVals.concat(Object.keys(blockInfo.mods[modName])); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (blockInfo && blockInfo.mods && blockInfo.mods[modName]) {··· modVals = modVals.concat(Object.keys(blockInfo.mods[modName])); } |
| ✗ Negative was not executed (else) | }··· }); |
| Branch LogicalExpression | |
| ✗ Was not returned | if (blockInfo && blockInfo.mods && blockInfo.mods[modName]) { |
| ✗ Was not returned | if (blockInfo && blockInfo.mods && blockInfo.mods[modName]) { |
| Branch LogicalExpression | |
| ✗ Was not returned | if (blockInfo && blockInfo.mods && blockInfo.mods[modName]) { |
| ✗ Was not returned | if (blockInfo && blockInfo.mods && blockInfo.mods[modName]) { |
| Function getFilesInElementBySuffix | |
|---|---|
| ✗ Was not called | function getFilesInElementBySuffix(element, suffix) {··· var files = element.files.filter(function (f) { return f.suffix === suffix; }); var mods = element.mods; var elements = element.elements; Object.keys(mods).forEach(function (modName) { var mod = mods[modName]; Object.keys(mod).forEach(function (modVal) { files = files.concat(mod[modVal].files.filter(function (f) { return f.suffix === suffix; })); }); }); if (elements) { Object.keys(elements).forEach(function (elemName) { files = files.concat(getFilesInElementBySuffix(elements[elemName], suffix)); }); } return files; } |
| Function (anonymous_308) | |
|---|---|
| ✗ Was not called | var files = element.files.filter(function (f) { return f.suffix === suffix; }); |
| Function (anonymous_309) | |
|---|---|
| ✗ Was not called | Object.keys(mods).forEach(function (modName) {··· var mod = mods[modName]; Object.keys(mod).forEach(function (modVal) { files = files.concat(mod[modVal].files.filter(function (f) { return f.suffix === suffix; })); }); }); |
| Function (anonymous_310) | |
|---|---|
| ✗ Was not called | Object.keys(mod).forEach(function (modVal) {··· files = files.concat(mod[modVal].files.filter(function (f) { return f.suffix === suffix; })); }); |
| Function (anonymous_311) | |
|---|---|
| ✗ Was not called | files = files.concat(mod[modVal].files.filter(function (f) { return f.suffix === suffix; })); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (elements) {··· Object.keys(elements).forEach(function (elemName) { files = files.concat(getFilesInElementBySuffix(elements[elemName], suffix)); }); } |
| ✗ Negative was not executed (else) | }··· return files; |
| Function (anonymous_312) | |
|---|---|
| ✗ Was not called | Object.keys(elements).forEach(function (elemName) {··· files = files.concat(getFilesInElementBySuffix(elements[elemName], suffix)); }); |
| Function CacheStorage | |
|---|---|
| ✗ Was not called | function CacheStorage(filename) {··· this._filename = filename; this._data = {}; this._mtime = 0; } |
| Function (anonymous_314) | |
|---|---|
| ✗ Was not called | load: function () {··· if (fs.existsSync(this._filename)) { dropRequireCache(require, this._filename); try { this._data = require(this._filename); } catch (e) { this._data = {}; } this._mtime = fs.statSync(this._filename).mtime.getTime(); } else { this._data = {}; } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (fs.existsSync(this._filename)) {··· dropRequireCache(require, this._filename); try { this._data = require(this._filename); } catch (e) { this._data = {}; } this._mtime = fs.statSync(this._filename).mtime.getTime(); } else { |
| ✗ Negative was not executed (else) | } else {··· this._data = {}; } |
| Function (anonymous_315) | |
|---|---|
| ✗ Was not called | save: function () {··· fs.writeFileSync(this._filename, 'module.exports = ' + JSON.stringify(this._data) + ';', 'utf8'); this._mtime = fs.statSync(this._filename).mtime.getTime(); }, |
| Function (anonymous_316) | |
|---|---|
| ✗ Was not called | get: function (prefix, key) {··· return this._data[prefix] && this._data[prefix][key]; }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return this._data[prefix] && this._data[prefix][key]; |
| ✗ Was not returned | return this._data[prefix] && this._data[prefix][key]; |
| Function (anonymous_317) | |
|---|---|
| ✗ Was not called | set: function (prefix, key, value) {··· (this._data[prefix] || (this._data[prefix] = {}))[key] = value; }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (this._data[prefix] || (this._data[prefix] = {}))[key] = value; |
| ✗ Was not returned | (this._data[prefix] || (this._data[prefix] = {}))[key] = value; |
| Function (anonymous_318) | |
|---|---|
| ✗ Was not called | invalidate: function (prefix, key) {··· var prefixObj = this._data[prefix]; if (prefixObj) { delete prefixObj[key]; } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (prefixObj) {··· delete prefixObj[key]; } |
| ✗ Negative was not executed (else) | }··· }, |
| Function (anonymous_319) | |
|---|---|
| ✗ Was not called | dropPrefix: function (prefix) {··· delete this._data[prefix]; }, |
| Function (anonymous_320) | |
|---|---|
| ✗ Was not called | drop: function () {··· this._data = {}; } |
| Function Cache | |
|---|---|
| ✗ Was not called | function Cache(storage, prefix) {··· this._storage = storage; this._prefix = prefix; } |
| Function (anonymous_322) | |
|---|---|
| ✗ Was not called | get: function (key) {··· return this._storage.get(this._prefix, key); }, |
| Function (anonymous_323) | |
|---|---|
| ✗ Was not called | set: function (key, value) {··· this._storage.set(this._prefix, key, value); }, |
| Function (anonymous_324) | |
|---|---|
| ✗ Was not called | invalidate: function (key) {··· this._storage.invalidate(this._prefix, key); }, |
| Function (anonymous_325) | |
|---|---|
| ✗ Was not called | drop: function () {··· this._storage.dropPrefix(this._prefix); }, |
| Function (anonymous_326) | |
|---|---|
| ✗ Was not called | subCache: function (name) {··· return new Cache(this._storage, this._prefix + '/' + name); }, |
| Function (anonymous_327) | |
|---|---|
| ✗ Was not called | _getFileInfo: function (fullname) {··· var filename = path.basename(fullname); var mtime = null; if (fs.existsSync(fullname)) { mtime = fs.statSync(fullname).mtime.getTime(); } return { name: filename, fullname: fullname, suffix: filename.split('.').slice(1).join('.'), mtime: mtime }; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (fs.existsSync(fullname)) {··· mtime = fs.statSync(fullname).mtime.getTime(); } |
| ✗ Negative was not executed (else) | }··· return { |
| Function (anonymous_328) | |
|---|---|
| ✗ Was not called | needRebuildFile: function (cacheKey, filename) {··· var cachedFile = this.get(cacheKey); if (cachedFile) { return cachedFile.mtime !== this._getFileInfo(filename).mtime; } else { return true; } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (cachedFile) {··· return cachedFile.mtime !== this._getFileInfo(filename).mtime; } else { |
| ✗ Negative was not executed (else) | } else {··· return true; } |
| Function (anonymous_329) | |
|---|---|
| ✗ Was not called | cacheFileInfo: function (cacheKey, filename) {··· this.set(cacheKey, this._getFileInfo(filename)); }, |
| Function (anonymous_330) | |
|---|---|
| ✗ Was not called | needRebuildFileList: function (cacheKey, files) {··· var cachedFiles = this.get(cacheKey); if (cachedFiles && Array.isArray(cachedFiles)) { var l = files.length; if (l !== cachedFiles.length) { return true; } for (var i = 0; i < l; i++) { var cf = cachedFiles[i]; var fileInfo = files[i]; if (cf.mtime !== fileInfo.mtime || cf.fullname !== fileInfo.fullname) { return true; } } return false; } else { return true; } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (cachedFiles && Array.isArray(cachedFiles)) {··· var l = files.length; if (l !== cachedFiles.length) { return true; } for (var i = 0; i < l; i++) { var cf = cachedFiles[i]; var fileInfo = files[i]; if (cf.mtime !== fileInfo.mtime || cf.fullname !== fileInfo.fullname) { return true; } } return false; } else { |
| ✗ Negative was not executed (else) | } else {··· return true; } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (cachedFiles && Array.isArray(cachedFiles)) { |
| ✗ Was not returned | if (cachedFiles && Array.isArray(cachedFiles)) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (l !== cachedFiles.length) {··· return true; } |
| ✗ Negative was not executed (else) | }··· for (var i = 0; i < l; i++) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (cf.mtime !== fileInfo.mtime || cf.fullname !== fileInfo.fullname) {··· return true; } |
| ✗ Negative was not executed (else) | }··· } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (cf.mtime !== fileInfo.mtime || cf.fullname !== fileInfo.fullname) { |
| ✗ Was not returned | if (cf.mtime !== fileInfo.mtime || cf.fullname !== fileInfo.fullname) { |
| Function (anonymous_331) | |
|---|---|
| ✗ Was not called | cacheFileList: function (cacheKey, filelist) {··· this.set(cacheKey, filelist); }, |
| Function (anonymous_332) | |
|---|---|
| ✗ Was not called | destruct: function () {··· delete this._storage; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!program.args.length) {··· program.outputHelp(); } |
| ✓ Negative was executed (else) | }··· program.command('*') |
| Function (anonymous_335) | |
|---|---|
| ✗ Was not called | .action(function () {··· var args = program.args.slice(0); var cmd = args.pop(); makePlatform.init(path.resolve(cmd.dir)).then((function () { if (cmd.hideWarnings) { makePlatform.getLogger().hideWarnings(); } if (cmd.cache) { makePlatform.loadCache(); } return makePlatform.build(args).then(function () { if (cmd.graph) { console.log(makePlatform.getBuildGraph().render()); } makePlatform.saveCache(); return makePlatform.destruct(); }); })) .then(null, function (err) { if (cmd.graph) { console.log(makePlatform.getBuildGraph().render()); } console.error(err.stack); process.exit(1); }); }); |
| Function (anonymous_336) | |
|---|---|
| ✗ Was not called | makePlatform.init(path.resolve(cmd.dir)).then((function () {··· if (cmd.hideWarnings) { makePlatform.getLogger().hideWarnings(); } if (cmd.cache) { makePlatform.loadCache(); } return makePlatform.build(args).then(function () { if (cmd.graph) { console.log(makePlatform.getBuildGraph().render()); } makePlatform.saveCache(); return makePlatform.destruct(); }); })) |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (cmd.hideWarnings) {··· makePlatform.getLogger().hideWarnings(); } |
| ✗ Negative was not executed (else) | }··· if (cmd.cache) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (cmd.cache) {··· makePlatform.loadCache(); } |
| ✗ Negative was not executed (else) | }··· return makePlatform.build(args).then(function () { |
| Function (anonymous_337) | |
|---|---|
| ✗ Was not called | return makePlatform.build(args).then(function () {··· if (cmd.graph) { console.log(makePlatform.getBuildGraph().render()); } makePlatform.saveCache(); return makePlatform.destruct(); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (cmd.graph) {··· console.log(makePlatform.getBuildGraph().render()); } |
| ✗ Negative was not executed (else) | }··· makePlatform.saveCache(); |
| Function (anonymous_338) | |
|---|---|
| ✗ Was not called | .then(null, function (err) {··· if (cmd.graph) { console.log(makePlatform.getBuildGraph().render()); } console.error(err.stack); process.exit(1); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (cmd.graph) {··· console.log(makePlatform.getBuildGraph().render()); } |
| ✗ Negative was not executed (else) | }··· console.error(err.stack); |
| Function (anonymous_340) | |
|---|---|
| ✗ Was not called | init: function (cdir, mode) {··· this._mode = mode = mode || process.env.YENV || 'development'; this._cdir = cdir; var _this = this; var projectName = path.basename(cdir); var configDir = this._getConfigDir(); var makefilePath = this._getMakeFile('make'); var personalMakefilePath = this._getMakeFile('make.personal'); if (!makefilePath) { throw new Error('Cannot find make configuration file.'); } this._projectName = projectName; this._logger = new Logger(); this._buildState = {}; this._makefiles = [makefilePath, personalMakefilePath]; this._graph = new BuildGraph(projectName); var projectConfig = this._projectConfig = new ProjectConfig(cdir); try { dropRequireCache(require, makefilePath); require(makefilePath)(projectConfig); } catch (err) { return Vow.reject(err); } if (personalMakefilePath) { dropRequireCache(require, personalMakefilePath); require(personalMakefilePath)(projectConfig); } this._makefiles = this._makefiles.concat(projectConfig.getIncludedConfigFilenames()); var modeConfig = projectConfig.getModeConfig(mode); if (modeConfig) { modeConfig.exec(null, projectConfig); } this._languages = projectConfig.getLanguages(); this._env = projectConfig.getEnvValues(); this._levelNamingSchemes = projectConfig.getLevelNamingSchemes(); projectConfig.task('clean', function (task) { return task.cleanTargets([].slice.call(arguments, 1)); }); var tmpDir = configDir + '/tmp'; return vowFs.makeDir(tmpDir).then(function () { _this._cacheStorage = new CacheStorage(tmpDir + '/cache.js'); _this._nodes = {}; }); }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | this._mode = mode = mode || process.env.YENV || 'development'; |
| ✗ Was not returned | this._mode = mode = mode || process.env.YENV || 'development'; |
| Branch LogicalExpression | |
| ✗ Was not returned | this._mode = mode = mode || process.env.YENV || 'development'; |
| ✗ Was not returned | this._mode = mode = mode || process.env.YENV || 'development'; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!makefilePath) {··· throw new Error('Cannot find make configuration file.'); } |
| ✗ Negative was not executed (else) | }··· this._projectName = projectName; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (personalMakefilePath) {··· dropRequireCache(require, personalMakefilePath); require(personalMakefilePath)(projectConfig); } |
| ✗ Negative was not executed (else) | }··· this._makefiles = this._makefiles.concat(projectConfig.getIncludedConfigFilenames()); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (modeConfig) {··· modeConfig.exec(null, projectConfig); } |
| ✗ Negative was not executed (else) | }··· this._languages = projectConfig.getLanguages(); |
| Function (anonymous_341) | |
|---|---|
| ✗ Was not called | projectConfig.task('clean', function (task) {··· return task.cleanTargets([].slice.call(arguments, 1)); }); |
| Function (anonymous_342) | |
|---|---|
| ✗ Was not called | return vowFs.makeDir(tmpDir).then(function () {··· _this._cacheStorage = new CacheStorage(tmpDir + '/cache.js'); _this._nodes = {}; }); |
| Function (anonymous_343) | |
|---|---|
| ✗ Was not called | getDir: function () {··· return this._cdir; }, |
| Function (anonymous_344) | |
|---|---|
| ✗ Was not called | _getConfigDir: function () {··· var cdir = this.getDir(); var possibleDirs = ['.enb', '.bem']; var configDir; var isConfigDirExists = possibleDirs.some(function (dir) { configDir = path.join(cdir, dir); return fs.existsSync(configDir); }); if (isConfigDirExists) { return configDir; } else { throw new Error('Cannot find enb config directory. Should be either .enb/ or .bem/.'); } }, |
| Function (anonymous_345) | |
|---|---|
| ✗ Was not called | var isConfigDirExists = possibleDirs.some(function (dir) {··· configDir = path.join(cdir, dir); return fs.existsSync(configDir); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isConfigDirExists) {··· return configDir; } else { |
| ✗ Negative was not executed (else) | } else {··· throw new Error('Cannot find enb config directory. Should be either .enb/ or .bem/.'); } |
| Function (anonymous_346) | |
|---|---|
| ✗ Was not called | _getMakeFile: function (file) {··· var configDir = this._getConfigDir(); var possiblePrefixes = ['enb-', '']; var makeFile; var isMakeFileExists = possiblePrefixes.some(function (prefix) { makeFile = path.join(configDir, prefix + file + '.js'); return fs.existsSync(makeFile); }); if (isMakeFileExists) { return makeFile; } }, |
| Function (anonymous_347) | |
|---|---|
| ✗ Was not called | var isMakeFileExists = possiblePrefixes.some(function (prefix) {··· makeFile = path.join(configDir, prefix + file + '.js'); return fs.existsSync(makeFile); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isMakeFileExists) {··· return makeFile; } |
| ✗ Negative was not executed (else) | }··· }, |
| Function (anonymous_348) | |
|---|---|
| ✗ Was not called | getBuildGraph: function () {··· return this._graph; }, |
| Function (anonymous_349) | |
|---|---|
| ✗ Was not called | loadCache: function () {··· this._cacheStorage.load(); var version = require('../package.json').version; var mtimes = this._cacheStorage.get(':make', 'makefiles') || {}; var dropCache = false; // Invalidate cache if mode was changed. if (this._cacheStorage.get(':make', 'mode') !== this._mode) { dropCache = true; } // Invalidate cache if ENB package was updated. if (this._cacheStorage.get(':make', 'version') !== version) { dropCache = true; } // Invalidate cache if any of makefiles were updated. var currentMTimes = this._getMakefileMTimes(); Object.keys(currentMTimes).forEach(function (makefilePath) { if (currentMTimes[makefilePath] !== mtimes[makefilePath]) { dropCache = true; } }); if (dropCache) { this._cacheStorage.drop(); } }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var mtimes = this._cacheStorage.get(':make', 'makefiles') || {}; |
| ✗ Was not returned | var mtimes = this._cacheStorage.get(':make', 'makefiles') || {}; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this._cacheStorage.get(':make', 'mode') !== this._mode) {··· dropCache = true; } |
| ✗ Negative was not executed (else) | }··· // Invalidate cache if ENB package was updated. |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this._cacheStorage.get(':make', 'version') !== version) {··· dropCache = true; } |
| ✗ Negative was not executed (else) | }··· // Invalidate cache if any of makefiles were updated. |
| Function (anonymous_350) | |
|---|---|
| ✗ Was not called | Object.keys(currentMTimes).forEach(function (makefilePath) {··· if (currentMTimes[makefilePath] !== mtimes[makefilePath]) { dropCache = true; } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (currentMTimes[makefilePath] !== mtimes[makefilePath]) {··· dropCache = true; } |
| ✗ Negative was not executed (else) | }··· }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dropCache) {··· this._cacheStorage.drop(); } |
| ✗ Negative was not executed (else) | }··· }, |
| Function (anonymous_351) | |
|---|---|
| ✗ Was not called | _getMakefileMTimes: function () {··· var res = {}; this._makefiles.forEach(function (makefilePath) { if (fs.existsSync(makefilePath)) { res[makefilePath] = fs.statSync(makefilePath).mtime.getTime(); } }); return res; }, |
| Function (anonymous_352) | |
|---|---|
| ✗ Was not called | this._makefiles.forEach(function (makefilePath) {··· if (fs.existsSync(makefilePath)) { res[makefilePath] = fs.statSync(makefilePath).mtime.getTime(); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (fs.existsSync(makefilePath)) {··· res[makefilePath] = fs.statSync(makefilePath).mtime.getTime(); } |
| ✗ Negative was not executed (else) | }··· }); |
| Function (anonymous_353) | |
|---|---|
| ✗ Was not called | saveCache: function () {··· this._cacheStorage.set(':make', 'mode', this._mode); this._cacheStorage.set(':make', 'version', require('../package.json').version); this._cacheStorage.set(':make', 'makefiles', this._getMakefileMTimes()); this._cacheStorage.save(); }, |
| Function (anonymous_354) | |
|---|---|
| ✗ Was not called | getEnv: function () {··· return this._env; }, |
| Function (anonymous_355) | |
|---|---|
| ✗ Was not called | setEnv: function (env) {··· this._env = env; }, |
| Function (anonymous_356) | |
|---|---|
| ✗ Was not called | getCacheStorage: function () {··· return this._cacheStorage; }, |
| Function (anonymous_357) | |
|---|---|
| ✗ Was not called | setCacheStorage: function (cacheStorage) {··· this._cacheStorage = cacheStorage; }, |
| Function (anonymous_358) | |
|---|---|
| ✗ Was not called | getLanguages: function () {··· return this._languages; }, |
| Function (anonymous_359) | |
|---|---|
| ✗ Was not called | setLanguages: function (languages) {··· this._languages = languages; }, |
| Function (anonymous_360) | |
|---|---|
| ✗ Was not called | getLogger: function () {··· return this._logger; }, |
| Function (anonymous_361) | |
|---|---|
| ✗ Was not called | setLogger: function (logger) {··· this._logger = logger; }, |
| Function (anonymous_362) | |
|---|---|
| ✗ Was not called | initNode: function (nodePath) {··· if (!this._nodeInitPromises[nodePath]) { var _this = this; var cdir = this.getDir(); var nodeConfig = this._projectConfig.getNodeConfig(nodePath); var node = new Node(nodePath, this, this._cache); node.setLogger(this._logger.subLogger(nodePath)); node.setBuildGraph(this._graph); this._nodes[nodePath] = node; this._nodeInitPromises[nodePath] = vowFs.makeDir(path.join(cdir, nodePath)) .then(function () { return Vow.when(nodeConfig.exec()); }) .then(function () { return Vow.all(_this._projectConfig.getNodeMaskConfigs(nodePath).map(function (nodeMaskConfig) { return nodeMaskConfig.exec([], nodeConfig); })); }) .then(function () { var mode = nodeConfig.getModeConfig(_this._mode); return mode && mode.exec(null, nodeConfig); }) .then(function () { node.setLanguages(nodeConfig.getLanguages() || _this._languages); node.setTargetsToBuild(nodeConfig.getTargets()); node.setTargetsToClean(nodeConfig.getCleanTargets()); node.setTechs(nodeConfig.getTechs()); node.setBuildState(_this._buildState); return node.loadTechs(); }); } return this._nodeInitPromises[nodePath]; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!this._nodeInitPromises[nodePath]) {··· var _this = this; var cdir = this.getDir(); var nodeConfig = this._projectConfig.getNodeConfig(nodePath); var node = new Node(nodePath, this, this._cache); node.setLogger(this._logger.subLogger(nodePath)); node.setBuildGraph(this._graph); this._nodes[nodePath] = node; this._nodeInitPromises[nodePath] = vowFs.makeDir(path.join(cdir, nodePath)) .then(function () { return Vow.when(nodeConfig.exec()); }) .then(function () { return Vow.all(_this._projectConfig.getNodeMaskConfigs(nodePath).map(function (nodeMaskConfig) { return nodeMaskConfig.exec([], nodeConfig); })); }) .then(function () { var mode = nodeConfig.getModeConfig(_this._mode); return mode && mode.exec(null, nodeConfig); }) .then(function () { node.setLanguages(nodeConfig.getLanguages() || _this._languages); node.setTargetsToBuild(nodeConfig.getTargets()); node.setTargetsToClean(nodeConfig.getCleanTargets()); node.setTechs(nodeConfig.getTechs()); node.setBuildState(_this._buildState); return node.loadTechs(); }); } |
| ✗ Negative was not executed (else) | }··· return this._nodeInitPromises[nodePath]; |
| Function (anonymous_363) | |
|---|---|
| ✗ Was not called | .then(function () {··· return Vow.when(nodeConfig.exec()); }) |
| Function (anonymous_364) | |
|---|---|
| ✗ Was not called | .then(function () {··· return Vow.all(_this._projectConfig.getNodeMaskConfigs(nodePath).map(function (nodeMaskConfig) { return nodeMaskConfig.exec([], nodeConfig); })); }) |
| Function (anonymous_365) | |
|---|---|
| ✗ Was not called | return Vow.all(_this._projectConfig.getNodeMaskConfigs(nodePath).map(function (nodeMaskConfig) {··· return nodeMaskConfig.exec([], nodeConfig); })); |
| Function (anonymous_366) | |
|---|---|
| ✗ Was not called | .then(function () {··· var mode = nodeConfig.getModeConfig(_this._mode); return mode && mode.exec(null, nodeConfig); }) |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return mode && mode.exec(null, nodeConfig); |
| ✗ Was not returned | return mode && mode.exec(null, nodeConfig); |
| Function (anonymous_367) | |
|---|---|
| ✗ Was not called | .then(function () {··· node.setLanguages(nodeConfig.getLanguages() || _this._languages); node.setTargetsToBuild(nodeConfig.getTargets()); node.setTargetsToClean(nodeConfig.getCleanTargets()); node.setTechs(nodeConfig.getTechs()); node.setBuildState(_this._buildState); return node.loadTechs(); }); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | node.setLanguages(nodeConfig.getLanguages() || _this._languages); |
| ✗ Was not returned | node.setLanguages(nodeConfig.getLanguages() || _this._languages); |
| Function (anonymous_368) | |
|---|---|
| ✗ Was not called | requireNodeSources: function (nodePath, sources) {··· var _this = this; return this.initNode(nodePath).then(function () { return _this._nodes[nodePath].requireSources(sources); }); }, |
| Function (anonymous_369) | |
|---|---|
| ✗ Was not called | return this.initNode(nodePath).then(function () {··· return _this._nodes[nodePath].requireSources(sources); }); |
| Function (anonymous_370) | |
|---|---|
| ✗ Was not called | dropCache: function () {··· this._cacheStorage.drop(); }, |
| Function (anonymous_371) | |
|---|---|
| ✗ Was not called | _getNodePathsLenDesc: function () {··· return Object.keys(this._projectConfig.getNodeConfigs()).sort(function (a, b) { return b.length - a.length; }); }, |
| Function (anonymous_372) | |
|---|---|
| ✗ Was not called | return Object.keys(this._projectConfig.getNodeConfigs()).sort(function (a, b) {··· return b.length - a.length; }); |
| Function (anonymous_373) | |
|---|---|
| ✗ Was not called | _resolveTarget: function (target, nodePaths) {··· target = target.replace(/^(\.\/)+/g, ''); for (var i = 0, l = nodePaths.length; i < l; i++) { var nodePath = nodePaths[i]; if (target.indexOf(nodePath) === 0) { var npl = nodePath.length; var charAtNpl = target.charAt(npl); if (target.length === npl) { return { node: nodePath, targets: ['*'] }; } else if (charAtNpl === '/' || charAtNpl === '\\') { return { node: nodePath, targets: [target.substr(npl + 1)] }; } } } throw TargetNotFoundError('Target not found: ' + target); }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (target.indexOf(nodePath) === 0) {··· var npl = nodePath.length; var charAtNpl = target.charAt(npl); if (target.length === npl) { return { node: nodePath, targets: ['*'] }; } else if (charAtNpl === '/' || charAtNpl === '\\') { return { node: nodePath, targets: [target.substr(npl + 1)] }; } } |
| ✗ Negative was not executed (else) | }··· } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (target.length === npl) {··· return { node: nodePath, targets: ['*'] }; } else if (charAtNpl === '/' || charAtNpl === '\\') { |
| ✗ Negative was not executed (else) | } else if (charAtNpl === '/' || charAtNpl === '\\') {··· return { node: nodePath, targets: [target.substr(npl + 1)] }; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (charAtNpl === '/' || charAtNpl === '\\') {··· return { node: nodePath, targets: [target.substr(npl + 1)] }; } |
| ✗ Negative was not executed (else) | }··· } |
| Branch LogicalExpression | |
| ✗ Was not returned | } else if (charAtNpl === '/' || charAtNpl === '\\') { |
| ✗ Was not returned | } else if (charAtNpl === '/' || charAtNpl === '\\') { |
| Function (anonymous_374) | |
|---|---|
| ✗ Was not called | _resolveTargets: function (targets) {··· var _this = this; var buildTargets = []; var nodeConfigs = this._projectConfig.getNodeConfigs(); var nodePathsDesc = this._getNodePathsLenDesc(); if (targets.length) { var targetIndex = {}; targets.forEach(function (targetName) { var target = _this._resolveTarget(targetName, nodePathsDesc); if (targetIndex[target.node]) { var currentTargetList = targetIndex[target.node].targets; target.targets.forEach(function (resTargetName) { if (currentTargetList.indexOf(resTargetName) === -1) { currentTargetList.push(resTargetName); } }); } else { targetIndex[target.node] = target; buildTargets.push(target); } }); } else { Object.keys(nodeConfigs).forEach(function (nodePath) { buildTargets.push({ node: nodePath, targets: ['*'] }); }); } return buildTargets; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (targets.length) {··· var targetIndex = {}; targets.forEach(function (targetName) { var target = _this._resolveTarget(targetName, nodePathsDesc); if (targetIndex[target.node]) { var currentTargetList = targetIndex[target.node].targets; target.targets.forEach(function (resTargetName) { if (currentTargetList.indexOf(resTargetName) === -1) { currentTargetList.push(resTargetName); } }); } else { targetIndex[target.node] = target; buildTargets.push(target); } }); } else { |
| ✗ Negative was not executed (else) | } else {··· Object.keys(nodeConfigs).forEach(function (nodePath) { buildTargets.push({ node: nodePath, targets: ['*'] }); }); } |
| Function (anonymous_375) | |
|---|---|
| ✗ Was not called | targets.forEach(function (targetName) {··· var target = _this._resolveTarget(targetName, nodePathsDesc); if (targetIndex[target.node]) { var currentTargetList = targetIndex[target.node].targets; target.targets.forEach(function (resTargetName) { if (currentTargetList.indexOf(resTargetName) === -1) { currentTargetList.push(resTargetName); } }); } else { targetIndex[target.node] = target; buildTargets.push(target); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (targetIndex[target.node]) {··· var currentTargetList = targetIndex[target.node].targets; target.targets.forEach(function (resTargetName) { if (currentTargetList.indexOf(resTargetName) === -1) { currentTargetList.push(resTargetName); } }); } else { |
| ✗ Negative was not executed (else) | } else {··· targetIndex[target.node] = target; buildTargets.push(target); } |
| Function (anonymous_376) | |
|---|---|
| ✗ Was not called | target.targets.forEach(function (resTargetName) {··· if (currentTargetList.indexOf(resTargetName) === -1) { currentTargetList.push(resTargetName); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (currentTargetList.indexOf(resTargetName) === -1) {··· currentTargetList.push(resTargetName); } |
| ✗ Negative was not executed (else) | }··· }); |
| Function (anonymous_377) | |
|---|---|
| ✗ Was not called | Object.keys(nodeConfigs).forEach(function (nodePath) {··· buildTargets.push({ node: nodePath, targets: ['*'] }); }); |
| Function (anonymous_378) | |
|---|---|
| ✗ Was not called | buildTargets: function (targets) {··· var _this = this; this._cache = new Cache(this._cacheStorage, this._projectName); try { var targetList = this._resolveTargets(targets); return Vow.all(targetList.map(function (target) { return _this.initNode(target.node); })).then(function () { return Vow.all(targetList.map(function (target) { return _this._nodes[target.node].build(target.targets); })).then(function (builtInfoList) { var builtTargets = []; builtInfoList.forEach(function (builtInfo) { builtTargets = builtTargets.concat(builtInfo.builtTargets); }); return { builtTargets: builtTargets }; }); }); } catch (err) { return Vow.reject(err); } }, |
| Function (anonymous_379) | |
|---|---|
| ✗ Was not called | return Vow.all(targetList.map(function (target) {··· return _this.initNode(target.node); })).then(function () { |
| Function (anonymous_380) | |
|---|---|
| ✗ Was not called | })).then(function () {··· return Vow.all(targetList.map(function (target) { return _this._nodes[target.node].build(target.targets); })).then(function (builtInfoList) { var builtTargets = []; builtInfoList.forEach(function (builtInfo) { builtTargets = builtTargets.concat(builtInfo.builtTargets); }); return { builtTargets: builtTargets }; }); }); |
| Function (anonymous_381) | |
|---|---|
| ✗ Was not called | return Vow.all(targetList.map(function (target) {··· return _this._nodes[target.node].build(target.targets); })).then(function (builtInfoList) { |
| Function (anonymous_382) | |
|---|---|
| ✗ Was not called | })).then(function (builtInfoList) {··· var builtTargets = []; builtInfoList.forEach(function (builtInfo) { builtTargets = builtTargets.concat(builtInfo.builtTargets); }); return { builtTargets: builtTargets }; }); |
| Function (anonymous_383) | |
|---|---|
| ✗ Was not called | builtInfoList.forEach(function (builtInfo) {··· builtTargets = builtTargets.concat(builtInfo.builtTargets); }); |
| Function (anonymous_384) | |
|---|---|
| ✗ Was not called | getProjectConfig: function () {··· return this._projectConfig; }, |
| Function (anonymous_385) | |
|---|---|
| ✗ Was not called | cleanTargets: function (targets) {··· var _this = this; this._cache = new Cache(this._cacheStorage, this._projectName); try { var targetList = this._resolveTargets(targets); return Vow.all(targetList.map(function (target) { return _this.initNode(target.node); })).then(function () { return Vow.all(targetList.map(function (target) { return _this._nodes[target.node].clean(target.targets); })); }); } catch (err) { return Vow.reject(err); } }, |
| Function (anonymous_386) | |
|---|---|
| ✗ Was not called | return Vow.all(targetList.map(function (target) {··· return _this.initNode(target.node); })).then(function () { |
| Function (anonymous_387) | |
|---|---|
| ✗ Was not called | })).then(function () {··· return Vow.all(targetList.map(function (target) { return _this._nodes[target.node].clean(target.targets); })); }); |
| Function (anonymous_388) | |
|---|---|
| ✗ Was not called | return Vow.all(targetList.map(function (target) {··· return _this._nodes[target.node].clean(target.targets); })); |
| Function (anonymous_389) | |
|---|---|
| ✗ Was not called | buildTask: function (taskName, args) {··· var task = this._projectConfig.getTaskConfig(taskName); task.setMakePlatform(this); return Vow.when(task.exec(args)); }, |
| Function (anonymous_390) | |
|---|---|
| ✗ Was not called | destruct: function () {··· this._buildState = null; delete this._projectConfig; var nodes = this._nodes; Object.keys(nodes).forEach(function (nodeName) { nodes[nodeName].destruct(); }); delete this._nodes; if (this._cacheStorage) { this._cacheStorage.drop(); delete this._cacheStorage; } if (this._cache) { this._cache.destruct(); delete this._cache; } delete this._levelNamingSchemes; }, |
| Function (anonymous_391) | |
|---|---|
| ✗ Was not called | Object.keys(nodes).forEach(function (nodeName) {··· nodes[nodeName].destruct(); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this._cacheStorage) {··· this._cacheStorage.drop(); delete this._cacheStorage; } |
| ✗ Negative was not executed (else) | }··· if (this._cache) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this._cache) {··· this._cache.destruct(); delete this._cache; } |
| ✗ Negative was not executed (else) | }··· delete this._levelNamingSchemes; |
| Function (anonymous_392) | |
|---|---|
| ✗ Was not called | build: function (targets) {··· var promise = Vow.promise(); var startTime = new Date(); var _this = this; var targetTask; try { this._logger.log('build started'); if (targets.length && this._projectConfig.getTaskConfig(targets[0])) { targetTask = this.buildTask(targets[0], targets.slice(1)); } else { targetTask = this.buildTargets(targets); } targetTask.then(function () { _this._logger.log('build finished - ' + colors.red((new Date() - startTime) + 'ms')); Object.keys(_this._nodes).forEach(function (nodeName) { _this._nodes[nodeName].getLogger().setEnabled(false); }); promise.fulfill(); }, function (err) { _this._logger.log('build failed'); promise.reject(err); }); } catch (err) { promise.reject(err); } return promise; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (targets.length && this._projectConfig.getTaskConfig(targets[0])) {··· targetTask = this.buildTask(targets[0], targets.slice(1)); } else { |
| ✗ Negative was not executed (else) | } else {··· targetTask = this.buildTargets(targets); } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (targets.length && this._projectConfig.getTaskConfig(targets[0])) { |
| ✗ Was not returned | if (targets.length && this._projectConfig.getTaskConfig(targets[0])) { |
| Function (anonymous_393) | |
|---|---|
| ✗ Was not called | targetTask.then(function () {··· _this._logger.log('build finished - ' + colors.red((new Date() - startTime) + 'ms')); Object.keys(_this._nodes).forEach(function (nodeName) { _this._nodes[nodeName].getLogger().setEnabled(false); }); promise.fulfill(); }, function (err) { |
| Function (anonymous_394) | |
|---|---|
| ✗ Was not called | Object.keys(_this._nodes).forEach(function (nodeName) {··· _this._nodes[nodeName].getLogger().setEnabled(false); }); |
| Function (anonymous_395) | |
|---|---|
| ✗ Was not called | }, function (err) {··· _this._logger.log('build failed'); promise.reject(err); }); |
| Function (anonymous_396) | |
|---|---|
| ✗ Was not called | getLevelNamingScheme: function (levelPath) {··· return this._levelNamingSchemes[levelPath]; } |
| Function (anonymous_397) | |
|---|---|
| ✗ Was not called | __constructor: function (nodePath, makePlatform, cache) {··· var root = makePlatform.getDir(); /** * Ссылка на платформу. * @type {MakePlatform} * @name Node.prototype._makePlatform * @private */ this._makePlatform = makePlatform; /** * Путь к директории с нодой относительно корня проекта. * @type {String} * @name Node.prototype._path * @private */ this._path = nodePath; /** * Абсолютный путь к корню проекта. * @type {String} * @name Node.prototype._root * @private */ this._root = root; /** * Абсолютный путь к директории с нодой. * @type {String} * @name Node.prototype._dirname * @private */ this._dirname = root + '/' + nodePath; /** * Имя директории с нодой. Например, "index" для ноды "pages/index". * @type {String} * @name Node.prototype._targetName * @private */ this._targetName = path.basename(nodePath); /** * Зарегистрированные технологии. * @type {Tech[]} * @name Node.prototype._techs * @private */ this._techs = []; /** * Ссылка на кэш платформы. * @type {Cache} * @name Node.prototype._cache * @private */ this._cache = cache; /** * Кэш для ноды. * @type {Cache} * @name Node.prototype._nodeCache * @private */ this._nodeCache = cache.subCache(nodePath); /** * Логгер для ноды. * @type {Logger} * @name Node.prototype._logger * @private */ this._logger = null; /** * Зарегистрированные таргеты со ссылками на технологии и с промисами на выполнение таргетов. * Формат: * { 'index.js': { tech: <ссылка на технологию>, started: true|false, promise: <промис на выполнение> } } * @type {Object} * @name Node.prototype._targetNames * @private */ this._targetNames = {}; /** * Список таргетов на сборку. * @type {String[]} * @name Node.prototype._targetNamesToBuild * @private */ this._targetNamesToBuild = []; /** * Список таргетов на удаление (для команды enb make clean). * @type {String[]} * @name Node.prototype._targetNamesToClean * @private */ this._targetNamesToClean = []; // TODO: Удалить this._languages. /** * Список языков для ноды. Уже почти не используется в связи с переходом на новый формат настроек. * Будет удалено в будущих версиях. * @type {String[]} * @name Node.prototype._languages * @deprecated * @private */ this._languages = null; /** * Промис на регистрацию всех таргетов для добавленных технологий. * @type {Promise} * @name Node.prototype._registerTargetsPromise * @private */ this._registerTargetsPromise = null; /** * Построитель графа сборки. * @type {BuildGraph} * @name Node.prototype._graph * @private */ this._graph = null; }, |
| Function (anonymous_398) | |
|---|---|
| ✗ Was not called | setBuildState: function (buildState) {··· this.buildState = buildState; }, |
| Function (anonymous_399) | |
|---|---|
| ✗ Was not called | setLogger: function (logger) {··· this._logger = logger; return this; }, |
| Function (anonymous_400) | |
|---|---|
| ✗ Was not called | getLogger: function () {··· return this._logger; }, |
| Function (anonymous_401) | |
|---|---|
| ✗ Was not called | setLanguages: function (languages) {··· this._languages = languages; return this; }, |
| Function (anonymous_402) | |
|---|---|
| ✗ Was not called | getLanguages: function () {··· return this._languages; }, |
| Function (anonymous_403) | |
|---|---|
| ✗ Was not called | getDir: function () {··· return this._dirname; }, |
| Function (anonymous_404) | |
|---|---|
| ✗ Was not called | getRootDir: function () {··· return this._root; }, |
| Function (anonymous_405) | |
|---|---|
| ✗ Was not called | getPath: function () {··· return this._path; }, |
| Function (anonymous_406) | |
|---|---|
| ✗ Was not called | getTechs: function () {··· return this._techs; }, |
| Function (anonymous_407) | |
|---|---|
| ✗ Was not called | setTechs: function (techs) {··· this._techs = techs; }, |
| Function (anonymous_408) | |
|---|---|
| ✗ Was not called | setTargetsToBuild: function (targetsToBuild) {··· this._targetNamesToBuild = targetsToBuild; }, |
| Function (anonymous_409) | |
|---|---|
| ✗ Was not called | setTargetsToClean: function (targetsToClean) {··· this._targetNamesToClean = targetsToClean; }, |
| Function (anonymous_410) | |
|---|---|
| ✗ Was not called | setBuildGraph: function (graph) {··· this._graph = graph; return this; }, |
| Function (anonymous_411) | |
|---|---|
| ✗ Was not called | resolvePath: function (filename) {··· return this._dirname + '/' + filename; }, |
| Function (anonymous_412) | |
|---|---|
| ✗ Was not called | resolveNodePath: function (nodePath, filename) {··· return this._root + '/' + nodePath + '/' + filename; }, |
| Function (anonymous_413) | |
|---|---|
| ✗ Was not called | unmaskNodeTargetName: function (nodePath, targetName) {··· return targetName.replace(/\?/g, path.basename(nodePath)); }, |
| Function (anonymous_414) | |
|---|---|
| ✗ Was not called | relativePath: function (filename) {··· var res = path.relative(path.join(this._root, this._path), filename); if (~res.indexOf('\\')) { res = res.replace(/\\/g, '/'); } if (res.charAt(0) !== '.') { res = './' + res; } return res; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (~res.indexOf('\\')) {··· res = res.replace(/\\/g, '/'); } |
| ✗ Negative was not executed (else) | }··· if (res.charAt(0) !== '.') { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (res.charAt(0) !== '.') {··· res = './' + res; } |
| ✗ Negative was not executed (else) | }··· return res; |
| Function (anonymous_415) | |
|---|---|
| ✗ Was not called | wwwRootPath: function (filename, wwwRoot) {··· wwwRoot = wwwRoot || '/'; return wwwRoot + path.relative(this._root, filename); }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | wwwRoot = wwwRoot || '/'; |
| ✗ Was not returned | wwwRoot = wwwRoot || '/'; |
| Function (anonymous_416) | |
|---|---|
| ✗ Was not called | cleanTargetFile: function (target) {··· var targetPath = this.resolvePath(target); if (fs.existsSync(targetPath)) { fs.unlinkSync(targetPath); this.getLogger().logClean(target); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (fs.existsSync(targetPath)) {··· fs.unlinkSync(targetPath); this.getLogger().logClean(target); } |
| ✗ Negative was not executed (else) | }··· }, |
| Function (anonymous_417) | |
|---|---|
| ✗ Was not called | createTmpFileForTarget: function (targetName) {··· var dir = this._dirname; function createTmpFilename() { var prefix = '_tmp_' + (new Date()).getTime() + (Math.random() * 0x1000000000).toString(36) + '_'; var filename = dir + '/' + prefix + targetName; return vowFs.exists(filename).then(function (exists) { if (exists) { return createTmpFilename(); } else { return vowFs.write(filename, '').then(function () { return filename; }); } }); } return createTmpFilename(); }, |
| Function createTmpFilename | |
|---|---|
| ✗ Was not called | function createTmpFilename() {··· var prefix = '_tmp_' + (new Date()).getTime() + (Math.random() * 0x1000000000).toString(36) + '_'; var filename = dir + '/' + prefix + targetName; return vowFs.exists(filename).then(function (exists) { if (exists) { return createTmpFilename(); } else { return vowFs.write(filename, '').then(function () { return filename; }); } }); } |
| Function (anonymous_419) | |
|---|---|
| ✗ Was not called | return vowFs.exists(filename).then(function (exists) {··· if (exists) { return createTmpFilename(); } else { return vowFs.write(filename, '').then(function () { return filename; }); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (exists) {··· return createTmpFilename(); } else { |
| ✗ Negative was not executed (else) | } else {··· return vowFs.write(filename, '').then(function () { return filename; }); } |
| Function (anonymous_420) | |
|---|---|
| ✗ Was not called | return vowFs.write(filename, '').then(function () {··· return filename; }); |
| Function (anonymous_421) | |
|---|---|
| ✗ Was not called | loadTechs: function () {··· var _this = this; return Vow.all(this._techs.map(function (t) { var nodeMirrorClass = function () {}; nodeMirrorClass.prototype = _this; var mirror = new nodeMirrorClass(); return Vow.when(t.init(mirror)).then(function () { return Vow.when(t.getTargets()).then(function (targets) { if (_this._graph) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; _this._graph.addTarget(targetPath, t.getName()); }); } var origRequireSources = _this.requireSources; var origRequireNodeSources = _this.requireNodeSources; mirror.requireSources = function (sources) { if (_this._graph) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources.forEach(function (source) { _this._graph.addDep(targetPath, _this._path + '/' + _this.unmaskTargetName(source)); }); }); } return origRequireSources.apply(_this, arguments); }; mirror.requireNodeSources = function (sources) { if (_this._graph) { Object.keys(sources).forEach(function (nodeName) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources[nodeName].forEach(function (source) { _this._graph.addDep( targetPath, nodeName + '/' + _this.unmaskNodeTargetName(nodeName, source) ); }); }); }); } return origRequireNodeSources.apply(_this, arguments); }; }); }); })); }, |
| Function (anonymous_422) | |
|---|---|
| ✗ Was not called | return Vow.all(this._techs.map(function (t) {··· var nodeMirrorClass = function () {}; nodeMirrorClass.prototype = _this; var mirror = new nodeMirrorClass(); return Vow.when(t.init(mirror)).then(function () { return Vow.when(t.getTargets()).then(function (targets) { if (_this._graph) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; _this._graph.addTarget(targetPath, t.getName()); }); } var origRequireSources = _this.requireSources; var origRequireNodeSources = _this.requireNodeSources; mirror.requireSources = function (sources) { if (_this._graph) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources.forEach(function (source) { _this._graph.addDep(targetPath, _this._path + '/' + _this.unmaskTargetName(source)); }); }); } return origRequireSources.apply(_this, arguments); }; mirror.requireNodeSources = function (sources) { if (_this._graph) { Object.keys(sources).forEach(function (nodeName) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources[nodeName].forEach(function (source) { _this._graph.addDep( targetPath, nodeName + '/' + _this.unmaskNodeTargetName(nodeName, source) ); }); }); }); } return origRequireNodeSources.apply(_this, arguments); }; }); }); })); |
| Function (anonymous_423) | |
|---|---|
| ✗ Was not called | var nodeMirrorClass = function () {}; |
| Function (anonymous_424) | |
|---|---|
| ✗ Was not called | return Vow.when(t.init(mirror)).then(function () {··· return Vow.when(t.getTargets()).then(function (targets) { if (_this._graph) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; _this._graph.addTarget(targetPath, t.getName()); }); } var origRequireSources = _this.requireSources; var origRequireNodeSources = _this.requireNodeSources; mirror.requireSources = function (sources) { if (_this._graph) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources.forEach(function (source) { _this._graph.addDep(targetPath, _this._path + '/' + _this.unmaskTargetName(source)); }); }); } return origRequireSources.apply(_this, arguments); }; mirror.requireNodeSources = function (sources) { if (_this._graph) { Object.keys(sources).forEach(function (nodeName) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources[nodeName].forEach(function (source) { _this._graph.addDep( targetPath, nodeName + '/' + _this.unmaskNodeTargetName(nodeName, source) ); }); }); }); } return origRequireNodeSources.apply(_this, arguments); }; }); }); |
| Function (anonymous_425) | |
|---|---|
| ✗ Was not called | return Vow.when(t.getTargets()).then(function (targets) {··· if (_this._graph) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; _this._graph.addTarget(targetPath, t.getName()); }); } var origRequireSources = _this.requireSources; var origRequireNodeSources = _this.requireNodeSources; mirror.requireSources = function (sources) { if (_this._graph) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources.forEach(function (source) { _this._graph.addDep(targetPath, _this._path + '/' + _this.unmaskTargetName(source)); }); }); } return origRequireSources.apply(_this, arguments); }; mirror.requireNodeSources = function (sources) { if (_this._graph) { Object.keys(sources).forEach(function (nodeName) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources[nodeName].forEach(function (source) { _this._graph.addDep( targetPath, nodeName + '/' + _this.unmaskNodeTargetName(nodeName, source) ); }); }); }); } return origRequireNodeSources.apply(_this, arguments); }; }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (_this._graph) {··· targets.forEach(function (target) { var targetPath = _this._path + '/' + target; _this._graph.addTarget(targetPath, t.getName()); }); } |
| ✗ Negative was not executed (else) | }··· var origRequireSources = _this.requireSources; |
| Function (anonymous_426) | |
|---|---|
| ✗ Was not called | targets.forEach(function (target) {··· var targetPath = _this._path + '/' + target; _this._graph.addTarget(targetPath, t.getName()); }); |
| Function (anonymous_427) | |
|---|---|
| ✗ Was not called | mirror.requireSources = function (sources) {··· if (_this._graph) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources.forEach(function (source) { _this._graph.addDep(targetPath, _this._path + '/' + _this.unmaskTargetName(source)); }); }); } return origRequireSources.apply(_this, arguments); }; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (_this._graph) {··· targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources.forEach(function (source) { _this._graph.addDep(targetPath, _this._path + '/' + _this.unmaskTargetName(source)); }); }); } |
| ✗ Negative was not executed (else) | }··· return origRequireSources.apply(_this, arguments); |
| Function (anonymous_428) | |
|---|---|
| ✗ Was not called | targets.forEach(function (target) {··· var targetPath = _this._path + '/' + target; sources.forEach(function (source) { _this._graph.addDep(targetPath, _this._path + '/' + _this.unmaskTargetName(source)); }); }); |
| Function (anonymous_429) | |
|---|---|
| ✗ Was not called | sources.forEach(function (source) {··· _this._graph.addDep(targetPath, _this._path + '/' + _this.unmaskTargetName(source)); }); |
| Function (anonymous_430) | |
|---|---|
| ✗ Was not called | mirror.requireNodeSources = function (sources) {··· if (_this._graph) { Object.keys(sources).forEach(function (nodeName) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources[nodeName].forEach(function (source) { _this._graph.addDep( targetPath, nodeName + '/' + _this.unmaskNodeTargetName(nodeName, source) ); }); }); }); } return origRequireNodeSources.apply(_this, arguments); }; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (_this._graph) {··· Object.keys(sources).forEach(function (nodeName) { targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources[nodeName].forEach(function (source) { _this._graph.addDep( targetPath, nodeName + '/' + _this.unmaskNodeTargetName(nodeName, source) ); }); }); }); } |
| ✗ Negative was not executed (else) | }··· return origRequireNodeSources.apply(_this, arguments); |
| Function (anonymous_431) | |
|---|---|
| ✗ Was not called | Object.keys(sources).forEach(function (nodeName) {··· targets.forEach(function (target) { var targetPath = _this._path + '/' + target; sources[nodeName].forEach(function (source) { _this._graph.addDep( targetPath, nodeName + '/' + _this.unmaskNodeTargetName(nodeName, source) ); }); }); }); |
| Function (anonymous_432) | |
|---|---|
| ✗ Was not called | targets.forEach(function (target) {··· var targetPath = _this._path + '/' + target; sources[nodeName].forEach(function (source) { _this._graph.addDep( targetPath, nodeName + '/' + _this.unmaskNodeTargetName(nodeName, source) ); }); }); |
| Function (anonymous_433) | |
|---|---|
| ✗ Was not called | sources[nodeName].forEach(function (source) {··· _this._graph.addDep( targetPath, nodeName + '/' + _this.unmaskNodeTargetName(nodeName, source) ); }); |
| Function (anonymous_434) | |
|---|---|
| ✗ Was not called | _getTarget: function (name) {··· var targets = this._targetNames; var target; if (!(target = targets[name])) { target = targets[name] = {started: false}; } if (!target.promise) { target.promise = Vow.promise(); } return target; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!(target = targets[name])) {··· target = targets[name] = {started: false}; } |
| ✗ Negative was not executed (else) | }··· if (!target.promise) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!target.promise) {··· target.promise = Vow.promise(); } |
| ✗ Negative was not executed (else) | }··· return target; |
| Function (anonymous_435) | |
|---|---|
| ✗ Was not called | hasRegisteredTarget: function (name) {··· return !!this._targetNames[name]; }, |
| Function (anonymous_436) | |
|---|---|
| ✗ Was not called | getTargetName: function (suffix) {··· return this._targetName + (suffix ? '.' + suffix : ''); }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return this._targetName + (suffix ? '.' + suffix : ''); |
| ✗ Negative was not returned (: ...) | return this._targetName + (suffix ? '.' + suffix : ''); |
| Function (anonymous_437) | |
|---|---|
| ✗ Was not called | unmaskTargetName: function (targetName) {··· return targetName.replace(/\?/g, this._targetName); }, |
| Function (anonymous_438) | |
|---|---|
| ✗ Was not called | _registerTarget: function (target, tech) {··· var targetObj = this._getTarget(target); if (targetObj.tech) { throw Error( 'Concurrent techs for target: ' + target + ', techs: "' + targetObj.tech.getName() + '" vs "' + tech.getName() + '"' ); } targetObj.tech = tech; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (targetObj.tech) {··· throw Error( 'Concurrent techs for target: ' + target + ', techs: "' + targetObj.tech.getName() + '" vs "' + tech.getName() + '"' ); } |
| ✗ Negative was not executed (else) | }··· targetObj.tech = tech; |
| Function (anonymous_439) | |
|---|---|
| ✗ Was not called | resolveTarget: function (target, value) {··· var targetObj = this._getTarget(target); if (!targetObj.isValid) { this._logger.logAction('rebuild', target, targetObj.tech.getName()); } if (this._graph) { this._graph.resolveTarget(this._path + '/' + target); } return targetObj.promise.fulfill(value); }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!targetObj.isValid) {··· this._logger.logAction('rebuild', target, targetObj.tech.getName()); } |
| ✗ Negative was not executed (else) | }··· if (this._graph) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this._graph) {··· this._graph.resolveTarget(this._path + '/' + target); } |
| ✗ Negative was not executed (else) | }··· return targetObj.promise.fulfill(value); |
| Function (anonymous_440) | |
|---|---|
| ✗ Was not called | isValidTarget: function (target) {··· var targetObj = this._getTarget(target); this._logger.isValid(target, targetObj.tech.getName()); targetObj.isValid = true; }, |
| Function (anonymous_441) | |
|---|---|
| ✗ Was not called | rejectTarget: function (target, err) {··· var targetObj = this._getTarget(target); this._logger.logErrorAction('failed', target, targetObj.tech.getName()); return targetObj.promise.reject(err); }, |
| Function (anonymous_442) | |
|---|---|
| ✗ Was not called | requireNodeSources: function (sourcesByNodes) {··· var _this = this; var resultByNodes = {}; return Vow.all(Object.keys(sourcesByNodes).map(function (nodePath) { return _this._makePlatform.requireNodeSources(nodePath, sourcesByNodes[nodePath]).then(function (results) { resultByNodes[nodePath] = results; }); })).then(function () { return resultByNodes; }); }, |
| Function (anonymous_443) | |
|---|---|
| ✗ Was not called | return Vow.all(Object.keys(sourcesByNodes).map(function (nodePath) {··· return _this._makePlatform.requireNodeSources(nodePath, sourcesByNodes[nodePath]).then(function (results) { resultByNodes[nodePath] = results; }); })).then(function () { |
| Function (anonymous_444) | |
|---|---|
| ✗ Was not called | return _this._makePlatform.requireNodeSources(nodePath, sourcesByNodes[nodePath]).then(function (results) {··· resultByNodes[nodePath] = results; }); |
| Function (anonymous_445) | |
|---|---|
| ✗ Was not called | })).then(function () {··· return resultByNodes; }); |
| Function (anonymous_446) | |
|---|---|
| ✗ Was not called | requireSources: function (sources) {··· var _this = this; return this._registerTargets().then(function () { return Vow.all(sources.map(function (source) { source = _this.unmaskTargetName(source); var targetObj = _this._getTarget(source); if (!targetObj.tech) { throw TargetNotFoundEror('There is no tech for target ' + _this._path + '/' + source + '.'); } if (!targetObj.started) { targetObj.started = true; if (!targetObj.tech.__started) { targetObj.tech.__started = true; try { Vow.when(targetObj.tech.build()).fail(function (err) { _this.rejectTarget(source, err); }); } catch (err) { _this.rejectTarget(source, err); } } } return targetObj.promise; })); }); }, |
| Function (anonymous_447) | |
|---|---|
| ✗ Was not called | return this._registerTargets().then(function () {··· return Vow.all(sources.map(function (source) { source = _this.unmaskTargetName(source); var targetObj = _this._getTarget(source); if (!targetObj.tech) { throw TargetNotFoundEror('There is no tech for target ' + _this._path + '/' + source + '.'); } if (!targetObj.started) { targetObj.started = true; if (!targetObj.tech.__started) { targetObj.tech.__started = true; try { Vow.when(targetObj.tech.build()).fail(function (err) { _this.rejectTarget(source, err); }); } catch (err) { _this.rejectTarget(source, err); } } } return targetObj.promise; })); }); |
| Function (anonymous_448) | |
|---|---|
| ✗ Was not called | return Vow.all(sources.map(function (source) {··· source = _this.unmaskTargetName(source); var targetObj = _this._getTarget(source); if (!targetObj.tech) { throw TargetNotFoundEror('There is no tech for target ' + _this._path + '/' + source + '.'); } if (!targetObj.started) { targetObj.started = true; if (!targetObj.tech.__started) { targetObj.tech.__started = true; try { Vow.when(targetObj.tech.build()).fail(function (err) { _this.rejectTarget(source, err); }); } catch (err) { _this.rejectTarget(source, err); } } } return targetObj.promise; })); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!targetObj.tech) {··· throw TargetNotFoundEror('There is no tech for target ' + _this._path + '/' + source + '.'); } |
| ✗ Negative was not executed (else) | }··· if (!targetObj.started) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!targetObj.started) {··· targetObj.started = true; if (!targetObj.tech.__started) { targetObj.tech.__started = true; try { Vow.when(targetObj.tech.build()).fail(function (err) { _this.rejectTarget(source, err); }); } catch (err) { _this.rejectTarget(source, err); } } } |
| ✗ Negative was not executed (else) | }··· return targetObj.promise; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!targetObj.tech.__started) {··· targetObj.tech.__started = true; try { Vow.when(targetObj.tech.build()).fail(function (err) { _this.rejectTarget(source, err); }); } catch (err) { _this.rejectTarget(source, err); } } |
| ✗ Negative was not executed (else) | }··· } |
| Function (anonymous_449) | |
|---|---|
| ✗ Was not called | Vow.when(targetObj.tech.build()).fail(function (err) {··· _this.rejectTarget(source, err); }); |
| Function (anonymous_450) | |
|---|---|
| ✗ Was not called | cleanTargets: function (targets) {··· var _this = this; return Vow.all(targets.map(function (target) { var targetObj = _this._getTarget(target); if (!targetObj.tech) { throw Error('There is no tech for target ' + target + '.'); } return Vow.when(targetObj.tech.clean()); })); }, |
| Function (anonymous_451) | |
|---|---|
| ✗ Was not called | return Vow.all(targets.map(function (target) {··· var targetObj = _this._getTarget(target); if (!targetObj.tech) { throw Error('There is no tech for target ' + target + '.'); } return Vow.when(targetObj.tech.clean()); })); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!targetObj.tech) {··· throw Error('There is no tech for target ' + target + '.'); } |
| ✗ Negative was not executed (else) | }··· return Vow.when(targetObj.tech.clean()); |
| Function (anonymous_452) | |
|---|---|
| ✗ Was not called | _registerTargets: function () {··· var _this = this; if (!this._registerTargetsPromise) { this._registerTargetsPromise = Vow.all(this._techs.map(function (t) { return t.getTargets(); })).then(function (targetLists) { function registerTarget(targetName) { _this._registerTarget(targetName, _this._techs[i]); } for (var i = 0, l = _this._techs.length; i < l; i++) { targetLists[i].forEach(registerTarget); } }); } return this._registerTargetsPromise; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!this._registerTargetsPromise) {··· this._registerTargetsPromise = Vow.all(this._techs.map(function (t) { return t.getTargets(); })).then(function (targetLists) { function registerTarget(targetName) { _this._registerTarget(targetName, _this._techs[i]); } for (var i = 0, l = _this._techs.length; i < l; i++) { targetLists[i].forEach(registerTarget); } }); } |
| ✗ Negative was not executed (else) | }··· return this._registerTargetsPromise; |
| Function (anonymous_453) | |
|---|---|
| ✗ Was not called | this._registerTargetsPromise = Vow.all(this._techs.map(function (t) {··· return t.getTargets(); })).then(function (targetLists) { |
| Function (anonymous_454) | |
|---|---|
| ✗ Was not called | })).then(function (targetLists) {··· function registerTarget(targetName) { _this._registerTarget(targetName, _this._techs[i]); } for (var i = 0, l = _this._techs.length; i < l; i++) { targetLists[i].forEach(registerTarget); } }); |
| Function registerTarget | |
|---|---|
| ✗ Was not called | function registerTarget(targetName) {··· _this._registerTarget(targetName, _this._techs[i]); } |
| Function (anonymous_456) | |
|---|---|
| ✗ Was not called | _resolveTargets: function (targets, defaultTargetList) {··· var targetsToBuild = this._targetNamesToBuild; var _this = this; if (targets) { targetsToBuild = targets; targetsToBuild = [].concat.apply([], targetsToBuild.map(function (targetName) { if (targetName === '*') { return (defaultTargetList.length ? defaultTargetList : Object.keys(_this._targetNames)); } else { return [targetName]; } })); } if (!targetsToBuild) { targetsToBuild = Object.keys(this._targetNames); } targetsToBuild = targetsToBuild.filter(function (elem, pos) { return targetsToBuild.indexOf(elem) === pos; }); return targetsToBuild; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (targets) {··· targetsToBuild = targets; targetsToBuild = [].concat.apply([], targetsToBuild.map(function (targetName) { if (targetName === '*') { return (defaultTargetList.length ? defaultTargetList : Object.keys(_this._targetNames)); } else { return [targetName]; } })); } |
| ✗ Negative was not executed (else) | }··· if (!targetsToBuild) { |
| Function (anonymous_457) | |
|---|---|
| ✗ Was not called | targetsToBuild = [].concat.apply([], targetsToBuild.map(function (targetName) {··· if (targetName === '*') { return (defaultTargetList.length ? defaultTargetList : Object.keys(_this._targetNames)); } else { return [targetName]; } })); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (targetName === '*') {··· return (defaultTargetList.length ? defaultTargetList : Object.keys(_this._targetNames)); } else { |
| ✗ Negative was not executed (else) | } else {··· return [targetName]; } |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return (defaultTargetList.length ? defaultTargetList : Object.keys(_this._targetNames)); |
| ✗ Negative was not returned (: ...) | return (defaultTargetList.length ? defaultTargetList : Object.keys(_this._targetNames)); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!targetsToBuild) {··· targetsToBuild = Object.keys(this._targetNames); } |
| ✗ Negative was not executed (else) | }··· targetsToBuild = targetsToBuild.filter(function (elem, pos) { |
| Function (anonymous_458) | |
|---|---|
| ✗ Was not called | targetsToBuild = targetsToBuild.filter(function (elem, pos) {··· return targetsToBuild.indexOf(elem) === pos; }); |
| Function (anonymous_459) | |
|---|---|
| ✗ Was not called | build: function (targets) {··· var _this = this; var targetsToBuild = _this._resolveTargets(targets, _this._targetNamesToBuild); return this.requireSources(targetsToBuild) .then(function () { return { builtTargets: targetsToBuild.map(function (target) { return path.join(_this._path, target); }) }; }); }, |
| Function (anonymous_460) | |
|---|---|
| ✗ Was not called | .then(function () {··· return { builtTargets: targetsToBuild.map(function (target) { return path.join(_this._path, target); }) }; }); |
| Function (anonymous_461) | |
|---|---|
| ✗ Was not called | builtTargets: targetsToBuild.map(function (target) {··· return path.join(_this._path, target); }) |
| Function (anonymous_462) | |
|---|---|
| ✗ Was not called | clean: function (targets, buildCache) {··· var _this = this; this.buildState = buildCache || {}; return this._registerTargets().then(function () { return _this.cleanTargets(_this._resolveTargets(targets, _this._targetNamesToClean)); }); }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | this.buildState = buildCache || {}; |
| ✗ Was not returned | this.buildState = buildCache || {}; |
| Function (anonymous_463) | |
|---|---|
| ✗ Was not called | return this._registerTargets().then(function () {··· return _this.cleanTargets(_this._resolveTargets(targets, _this._targetNamesToClean)); }); |
| Function (anonymous_464) | |
|---|---|
| ✗ Was not called | getNodeCache: function (subCacheName) {··· return subCacheName ? this._nodeCache.subCache(subCacheName) : this._nodeCache; }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return subCacheName ? this._nodeCache.subCache(subCacheName) : this._nodeCache; |
| ✗ Negative was not returned (: ...) | return subCacheName ? this._nodeCache.subCache(subCacheName) : this._nodeCache; |
| Function (anonymous_465) | |
|---|---|
| ✗ Was not called | getLevelNamingScheme: function (levelPath) {··· return this._makePlatform.getLevelNamingScheme(levelPath); }, |
| Function (anonymous_466) | |
|---|---|
| ✗ Was not called | destruct: function () {··· delete this._makePlatform; this._nodeCache.destruct(); delete this._nodeCache; delete this._techs; delete this._graph; } |
| Function TargetNotFoundError | |
|---|---|
| ✗ Was not called | function TargetNotFoundError() {··· var error = Error.apply(this, arguments); error.constructor = TargetNotFoundError; /*jshint proto:true */ error.__proto__ = TargetNotFoundError.prototype; return error; } |
| Function (anonymous_468) | |
|---|---|
| ✗ Was not called | __constructor: function (scope, options) {··· this._scope = scope || ''; this._enabled = true; this._options = options || {}; }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | this._scope = scope || ''; |
| ✗ Was not returned | this._scope = scope || ''; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | this._options = options || {}; |
| ✗ Was not returned | this._options = options || {}; |
| Function (anonymous_469) | |
|---|---|
| ✗ Was not called | log: function (msg, scope, action) {··· scope = scope || this._scope; action = action || ''; var dt = new Date(); if (this._enabled) { console.log( colors.grey( zeros(dt.getHours(), 2) + ':' + zeros(dt.getMinutes(), 2) + ':' + zeros(dt.getSeconds(), 2) + '.' + zeros(dt.getMilliseconds(), 3) + ' - ' ) + (action && action + ' ') + (scope && ('[' + colors.blue( scope.replace(/(:.+)$/, function (s, g) { return colors.magenta(g.substr(1)); }) ) + '] ') ) + msg ); } }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | scope = scope || this._scope; |
| ✗ Was not returned | scope = scope || this._scope; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | action = action || ''; |
| ✗ Was not returned | action = action || ''; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this._enabled) {··· console.log( colors.grey( zeros(dt.getHours(), 2) + ':' + zeros(dt.getMinutes(), 2) + ':' + zeros(dt.getSeconds(), 2) + '.' + zeros(dt.getMilliseconds(), 3) + ' - ' ) + (action && action + ' ') + (scope && ('[' + colors.blue( scope.replace(/(:.+)$/, function (s, g) { return colors.magenta(g.substr(1)); }) ) + '] ') ) + msg ); } |
| ✗ Negative was not executed (else) | }··· }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (action && action + ' ') + |
| ✗ Was not returned | (action && action + ' ') + |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (scope && ('[' +··· colors.blue( scope.replace(/(:.+)$/, function (s, g) { return colors.magenta(g.substr(1)); }) ) + '] ') |
| ✗ Was not returned | (scope && ('[' + |
| Function (anonymous_470) | |
|---|---|
| ✗ Was not called | scope.replace(/(:.+)$/, function (s, g) {··· return colors.magenta(g.substr(1)); }) |
| Function (anonymous_471) | |
|---|---|
| ✗ Was not called | logAction: function (action, target, additionalInfo) {··· this.log( (additionalInfo ? colors.grey(additionalInfo) : ''), (this._scope && (this._scope + '/')) + target, '[' + colors.green(action) + ']' ); }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | (additionalInfo ? colors.grey(additionalInfo) : ''), |
| ✗ Negative was not returned (: ...) | (additionalInfo ? colors.grey(additionalInfo) : ''), |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (this._scope && (this._scope + '/')) + target, |
| ✗ Was not returned | (this._scope && (this._scope + '/')) + target, |
| Function (anonymous_472) | |
|---|---|
| ✗ Was not called | logWarningAction: function (action, target, msg) {··· if (!this._options.hideWarnings) { this.log( msg, (this._scope && (this._scope + '/')) + target, '[' + colors.yellow(action) + ']' ); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!this._options.hideWarnings) {··· this.log( msg, (this._scope && (this._scope + '/')) + target, '[' + colors.yellow(action) + ']' ); } |
| ✗ Negative was not executed (else) | }··· }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (this._scope && (this._scope + '/')) + target, |
| ✗ Was not returned | (this._scope && (this._scope + '/')) + target, |
| Function (anonymous_473) | |
|---|---|
| ✗ Was not called | logTechIsDeprecated: function (target, deprecatedTech, thisPackage, newTech, newPackage, desc) {··· this.logWarningAction('deprecated', target, 'Tech ' + colors.bold(thisPackage + '/techs/' + deprecatedTech) + ' is deprecated.' + (newTech && newPackage ? ' ' + (newPackage === thisPackage ? 'Use ' : 'Install package ' + colors.bold(newPackage) + ' and use ' ) + 'tech ' + colors.bold(newPackage + '/techs/' + newTech) + ' instead.' : '' ) + (desc || '') ); }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | ' ' +··· (newPackage === thisPackage ? 'Use ' : 'Install package ' + colors.bold(newPackage) + ' and use ' ) + 'tech ' + colors.bold(newPackage + '/techs/' + newTech) + ' instead.' : |
| ✗ Negative was not returned (: ...) | '' |
| Branch LogicalExpression | |
| ✗ Was not returned | (newTech && newPackage ? |
| ✗ Was not returned | (newTech && newPackage ? |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | 'Use ' : |
| ✗ Negative was not returned (: ...) | 'Install package ' + colors.bold(newPackage) + ' and use ' |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (desc || '') |
| ✗ Was not returned | (desc || '') |
| Function (anonymous_474) | |
|---|---|
| ✗ Was not called | logOptionIsDeprecated: function (target, thisPackage, tech, thisOption, newOption, desc) {··· this.logWarningAction('deprecated', target, 'Option ' + colors.bold(thisOption) + ' of ' + colors.bold(thisPackage + '/techs/' + tech) + ' is deprecated.' + (newOption ? ' Use option ' + colors.bold(newOption) + ' instead.' : '') + (desc || '') ); }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | (newOption ? ' Use option ' + colors.bold(newOption) + ' instead.' : '') + |
| ✗ Negative was not returned (: ...) | (newOption ? ' Use option ' + colors.bold(newOption) + ' instead.' : '') + |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (desc || '') |
| ✗ Was not returned | (desc || '') |
| Function (anonymous_475) | |
|---|---|
| ✗ Was not called | logErrorAction: function (action, target, additionalInfo) {··· this.log( (additionalInfo ? colors.grey(additionalInfo) : ''), (this._scope && (this._scope + '/')) + target, '[' + colors.red(action) + ']' ); }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | (additionalInfo ? colors.grey(additionalInfo) : ''), |
| ✗ Negative was not returned (: ...) | (additionalInfo ? colors.grey(additionalInfo) : ''), |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (this._scope && (this._scope + '/')) + target, |
| ✗ Was not returned | (this._scope && (this._scope + '/')) + target, |
| Function (anonymous_476) | |
|---|---|
| ✗ Was not called | isValid: function (target, tech) {··· this.logAction('isValid', target, tech); }, |
| Function (anonymous_477) | |
|---|---|
| ✗ Was not called | logClean: function (target) {··· this.logAction('clean', target); }, |
| Function (anonymous_478) | |
|---|---|
| ✗ Was not called | setEnabled: function (enabled) {··· this._enabled = enabled; }, |
| Function (anonymous_479) | |
|---|---|
| ✗ Was not called | isEnabled: function () {··· return this._enabled; }, |
| Function (anonymous_480) | |
|---|---|
| ✗ Was not called | hideWarnings: function () {··· this._options.hideWarnings = true; }, |
| Function (anonymous_481) | |
|---|---|
| ✗ Was not called | showWarnings: function () {··· this._options.hideWarnings = false; }, |
| Function (anonymous_482) | |
|---|---|
| ✗ Was not called | subLogger: function (scope) {··· var res = new Logger( this._scope + (scope.charAt(0) === ':' ? scope : (this._scope && '/') + scope), this._options ); res.setEnabled(this._enabled); return res; } |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | this._scope + (scope.charAt(0) === ':' ? scope : (this._scope && '/') + scope), |
| ✗ Negative was not returned (: ...) | this._scope + (scope.charAt(0) === ':' ? scope : (this._scope && '/') + scope), |
| Branch LogicalExpression | |
| ✗ Was not returned | this._scope + (scope.charAt(0) === ':' ? scope : (this._scope && '/') + scope), |
| ✗ Was not returned | this._scope + (scope.charAt(0) === ':' ? scope : (this._scope && '/') + scope), |
| Function zeros | |
|---|---|
| ✗ Was not called | function zeros(s, l) {··· s = '' + s; while (s.length < l) { s = '0' + s; } return s; } |
| Branch LogicalExpression | |
|---|---|
| ✓ Was returned | var enabled = !process.env.NOCOLOR && tty.isatty(1) && tty.isatty(2); |
| ✗ Was not returned | var enabled = !process.env.NOCOLOR && tty.isatty(1) && tty.isatty(2); |
| Branch LogicalExpression | |
| ✓ Was returned | var enabled = !process.env.NOCOLOR && tty.isatty(1) && tty.isatty(2); |
| ✗ Was not returned | var enabled = !process.env.NOCOLOR && tty.isatty(1) && tty.isatty(2); |
| Function (anonymous_485) | |
|---|---|
| ✗ Was not called | module.exports[style] = function (str) {··· return enabled ? styles[style][0] + str + styles[style][1] : str; }; |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return enabled ? styles[style][0] + str + styles[style][1] : str; |
| ✗ Negative was not returned (: ...) | return enabled ? styles[style][0] + str + styles[style][1] : str; |
| Function (anonymous_486) | |
|---|---|
| ✗ Was not called | __constructor: function (rootPath) {··· this._rootPath = rootPath; this._nodeConfigs = {}; this._tasks = {}; this._nodeMaskConfigs = []; this._languages = null; this._levelNamingSchemes = []; /** * @type {{ModuleConfig}} * @private */ this._modules = {}; var env = this._env = {}; this._modes = {}; var processEnv = process.env; Object.keys(processEnv).forEach(function (key) { env[key] = processEnv[key]; }); }, |
| Function (anonymous_487) | |
|---|---|
| ✗ Was not called | Object.keys(processEnv).forEach(function (key) {··· env[key] = processEnv[key]; }); |
| Function (anonymous_488) | |
|---|---|
| ✗ Was not called | getLanguages: function () {··· return this._languages; }, |
| Function (anonymous_489) | |
|---|---|
| ✗ Was not called | setLanguages: function (languages) {··· this._languages = languages; return this; }, |
| Function (anonymous_490) | |
|---|---|
| ✗ Was not called | getRootPath: function () {··· return this._rootPath; }, |
| Function (anonymous_491) | |
|---|---|
| ✗ Was not called | resolvePath: function (sourcePath) {··· if (sourcePath) { if (typeof sourcePath === 'string') { return path.resolve(this._rootPath, sourcePath); } else { sourcePath.path = path.resolve(this._rootPath, sourcePath.path); return sourcePath; } } else { return this._rootPath; } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (sourcePath) {··· if (typeof sourcePath === 'string') { return path.resolve(this._rootPath, sourcePath); } else { sourcePath.path = path.resolve(this._rootPath, sourcePath.path); return sourcePath; } } else { |
| ✗ Negative was not executed (else) | } else {··· return this._rootPath; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (typeof sourcePath === 'string') {··· return path.resolve(this._rootPath, sourcePath); } else { |
| ✗ Negative was not executed (else) | } else {··· sourcePath.path = path.resolve(this._rootPath, sourcePath.path); return sourcePath; } |
| Function (anonymous_492) | |
|---|---|
| ✗ Was not called | node: function (path, func) {··· path = path.replace(/^\/+|\/+$/g, ''); if (!this._nodeConfigs[path]) { this._nodeConfigs[path] = new NodeConfig(path, this._rootPath, this); } if (func) { this._nodeConfigs[path].addChain(func); } return this; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!this._nodeConfigs[path]) {··· this._nodeConfigs[path] = new NodeConfig(path, this._rootPath, this); } |
| ✗ Negative was not executed (else) | }··· if (func) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (func) {··· this._nodeConfigs[path].addChain(func); } |
| ✗ Negative was not executed (else) | }··· return this; |
| Function (anonymous_493) | |
|---|---|
| ✗ Was not called | nodes: function () {··· var result; var input = arguments; var flat = false; var root = this._rootPath; var fn; function toRelative(path) { return path.replace(root + '/', ''); } while (!flat) { flat = true; result = []; for (var i = 0, l = input.length; i < l; i++) { var item = input[i]; if (typeof item === 'function') { fn = item; } else if (Array.isArray(item)) { result = result.concat(item); flat = false; } else if (item && typeof item === 'string') { if (~item.indexOf('*')) { result = result.concat(dirGlob.globSync(root + '/' + item).map(toRelative)); } else { result.push(item); } } } input = result; } var _this = this; result.forEach(function (nodePath) { _this.node(nodePath, fn); }); return this; }, |
| Function toRelative | |
|---|---|
| ✗ Was not called | function toRelative(path) {··· return path.replace(root + '/', ''); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (typeof item === 'function') {··· fn = item; } else if (Array.isArray(item)) { |
| ✗ Negative was not executed (else) | } else if (Array.isArray(item)) {··· result = result.concat(item); flat = false; } else if (item && typeof item === 'string') { if (~item.indexOf('*')) { result = result.concat(dirGlob.globSync(root + '/' + item).map(toRelative)); } else { result.push(item); } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (Array.isArray(item)) {··· result = result.concat(item); flat = false; } else if (item && typeof item === 'string') { |
| ✗ Negative was not executed (else) | } else if (item && typeof item === 'string') {··· if (~item.indexOf('*')) { result = result.concat(dirGlob.globSync(root + '/' + item).map(toRelative)); } else { result.push(item); } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (item && typeof item === 'string') {··· if (~item.indexOf('*')) { result = result.concat(dirGlob.globSync(root + '/' + item).map(toRelative)); } else { result.push(item); } } |
| ✗ Negative was not executed (else) | }··· } |
| Branch LogicalExpression | |
| ✗ Was not returned | } else if (item && typeof item === 'string') { |
| ✗ Was not returned | } else if (item && typeof item === 'string') { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (~item.indexOf('*')) {··· result = result.concat(dirGlob.globSync(root + '/' + item).map(toRelative)); } else { |
| ✗ Negative was not executed (else) | } else {··· result.push(item); } |
| Function (anonymous_495) | |
|---|---|
| ✗ Was not called | result.forEach(function (nodePath) {··· _this.node(nodePath, fn); }); |
| Function (anonymous_496) | |
|---|---|
| ✗ Was not called | nodeMask: function (mask, func) {··· var nodeMask = new NodeMaskConfig(mask); nodeMask.addChain(func); this._nodeMaskConfigs.push(nodeMask); return this; }, |
| Function (anonymous_497) | |
|---|---|
| ✗ Was not called | task: function (name, func) {··· if (!this._tasks[name]) { this._tasks[name] = new TaskConfig(name); } this._tasks[name].addChain(func); return this; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!this._tasks[name]) {··· this._tasks[name] = new TaskConfig(name); } |
| ✗ Negative was not executed (else) | }··· this._tasks[name].addChain(func); |
| Function (anonymous_498) | |
|---|---|
| ✗ Was not called | mode: function (name, func) {··· if (!this._modes[name]) { this._modes[name] = new ModeConfig(name); } this._modes[name].addChain(func); return this; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!this._modes[name]) {··· this._modes[name] = new ModeConfig(name); } |
| ✗ Negative was not executed (else) | }··· this._modes[name].addChain(func); |
| Function (anonymous_499) | |
|---|---|
| ✗ Was not called | registerModule: function (name, moduleConfig) {··· if (!this._modules[name]) { this._modules[name] = moduleConfig; } else { throw new Error('Module "' + name + '" is already registered.'); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!this._modules[name]) {··· this._modules[name] = moduleConfig; } else { |
| ✗ Negative was not executed (else) | } else {··· throw new Error('Module "' + name + '" is already registered.'); } |
| Function (anonymous_500) | |
|---|---|
| ✗ Was not called | module: function (name, func) {··· var module = this._modules[name]; if (module) { if (func) { module.addChain(func); return this; } else { return module; } } else { throw new Error('Module "' + name + '" is not registered.'); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (module) {··· if (func) { module.addChain(func); return this; } else { return module; } } else { |
| ✗ Negative was not executed (else) | } else {··· throw new Error('Module "' + name + '" is not registered.'); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (func) {··· module.addChain(func); return this; } else { |
| ✗ Negative was not executed (else) | } else {··· return module; } |
| Function (anonymous_501) | |
|---|---|
| ✗ Was not called | getTaskConfigs: function () {··· return this._tasks; }, |
| Function (anonymous_502) | |
|---|---|
| ✗ Was not called | getTaskConfig: function (taskName) {··· return this._tasks[taskName]; }, |
| Function (anonymous_503) | |
|---|---|
| ✗ Was not called | getModeConfigs: function () {··· return this._modes; }, |
| Function (anonymous_504) | |
|---|---|
| ✗ Was not called | getModeConfig: function (modeName) {··· return this._modes[modeName]; }, |
| Function (anonymous_505) | |
|---|---|
| ✗ Was not called | getNodeConfigs: function () {··· return this._nodeConfigs; }, |
| Function (anonymous_506) | |
|---|---|
| ✗ Was not called | getNodeConfig: function (nodeName) {··· return this._nodeConfigs[nodeName]; }, |
| Function (anonymous_507) | |
|---|---|
| ✗ Was not called | getNodeMaskConfigs: function (nodePath) {··· return nodePath ? this._nodeMaskConfigs.filter(function (nodeMask) { return nodeMask.getMask().test(nodePath); }) : this._nodeMaskConfigs; }, |
| Function (anonymous_508) | |
|---|---|
| ✗ Was not called | return nodePath ? this._nodeMaskConfigs.filter(function (nodeMask) {··· return nodeMask.getMask().test(nodePath); }) : this._nodeMaskConfigs; |
| Branch ConditionalExpression | |
| ✗ Positive was not returned (? ...) | return nodePath ? this._nodeMaskConfigs.filter(function (nodeMask) {··· return nodeMask.getMask().test(nodePath); }) : this._nodeMaskConfigs; |
| ✗ Negative was not returned (: ...) | }) : this._nodeMaskConfigs; |
| Function (anonymous_509) | |
|---|---|
| ✗ Was not called | getEnv: function (key) {··· return this._env[key]; }, |
| Function (anonymous_510) | |
|---|---|
| ✗ Was not called | setEnv: function (key, value) {··· var _this = this; if (typeof key === 'object') { Object.keys(key).forEach(function (name) { _this._env[name] = key[name]; }); } else { _this._env[key] = value; } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (typeof key === 'object') {··· Object.keys(key).forEach(function (name) { _this._env[name] = key[name]; }); } else { |
| ✗ Negative was not executed (else) | } else {··· _this._env[key] = value; } |
| Function (anonymous_511) | |
|---|---|
| ✗ Was not called | Object.keys(key).forEach(function (name) {··· _this._env[name] = key[name]; }); |
| Function (anonymous_512) | |
|---|---|
| ✗ Was not called | getEnvValues: function () {··· return this._env; }, |
| Function (anonymous_513) | |
|---|---|
| ✗ Was not called | includeConfig: function (filename) {··· filename = require.resolve(filename); (this._includedConfigFilenames || (this._includedConfigFilenames = [])).push(filename); dropRequireCache(require, filename); require(filename)(this); return this; }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (this._includedConfigFilenames || (this._includedConfigFilenames = [])).push(filename); |
| ✗ Was not returned | (this._includedConfigFilenames || (this._includedConfigFilenames = [])).push(filename); |
| Function (anonymous_514) | |
|---|---|
| ✗ Was not called | getIncludedConfigFilenames: function () {··· return this._includedConfigFilenames || []; }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return this._includedConfigFilenames || []; |
| ✗ Was not returned | return this._includedConfigFilenames || []; |
| Function (anonymous_515) | |
|---|---|
| ✗ Was not called | setLevelNamingScheme: function (level, schemeBuilder) {··· var levels = Array.isArray(level) ? level : [level]; var _this = this; levels.forEach(function (levelPath) { if (levelPath.charAt(0) !== '/') { levelPath = _this.resolvePath(levelPath); } _this._levelNamingSchemes[levelPath] = schemeBuilder; }); return this; }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var levels = Array.isArray(level) ? level : [level]; |
| ✗ Negative was not returned (: ...) | var levels = Array.isArray(level) ? level : [level]; |
| Function (anonymous_516) | |
|---|---|
| ✗ Was not called | levels.forEach(function (levelPath) {··· if (levelPath.charAt(0) !== '/') { levelPath = _this.resolvePath(levelPath); } _this._levelNamingSchemes[levelPath] = schemeBuilder; }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (levelPath.charAt(0) !== '/') {··· levelPath = _this.resolvePath(levelPath); } |
| ✗ Negative was not executed (else) | }··· _this._levelNamingSchemes[levelPath] = schemeBuilder; |
| Function (anonymous_517) | |
|---|---|
| ✗ Was not called | getLevelNamingSchemes: function () {··· return this._levelNamingSchemes; } |
| Function (anonymous_518) | |
|---|---|
| ✗ Was not called | __constructor: function (nodePath, root, projectConfig) {··· this.__base(); this._baseName = path.basename(nodePath); this._path = nodePath; this._root = root; this._targets = []; this._cleanTargets = []; this._techs = []; this._languages = null; this._projectConfig = projectConfig; this._modes = {}; }, |
| Function (anonymous_519) | |
|---|---|
| ✗ Was not called | mode: function (modeName, cb) {··· var modeConfig = this._modes[modeName]; if (!modeConfig) { modeConfig = this._modes[modeName] = new ModeConfig(modeName); } modeConfig.addChain(cb); return this; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!modeConfig) {··· modeConfig = this._modes[modeName] = new ModeConfig(modeName); } |
| ✗ Negative was not executed (else) | }··· modeConfig.addChain(cb); |
| Function (anonymous_520) | |
|---|---|
| ✗ Was not called | getModeConfig: function (modeName) {··· return this._modes[modeName]; }, |
| Function (anonymous_521) | |
|---|---|
| ✗ Was not called | setLanguages: function (languages) {··· this._languages = languages; return this; }, |
| Function (anonymous_522) | |
|---|---|
| ✗ Was not called | getLanguages: function () {··· return this._languages; }, |
| Function (anonymous_523) | |
|---|---|
| ✗ Was not called | getNodePath: function () {··· return this._root + '/' + this._path; }, |
| Function (anonymous_524) | |
|---|---|
| ✗ Was not called | resolvePath: function (path) {··· return this._root + '/' + this._path + (path ? '/' + path : ''); }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return this._root + '/' + this._path + (path ? '/' + path : ''); |
| ✗ Negative was not returned (: ...) | return this._root + '/' + this._path + (path ? '/' + path : ''); |
| Function (anonymous_525) | |
|---|---|
| ✗ Was not called | _processTarget: function (target) {··· var targetSources = { 'lang': this._languages || this._projectConfig.getLanguages() }; var targets = []; target = target.replace(/^\/+|\/+$/g, '').replace(/\?/g, this._baseName); function processTarget (target) { var match = target.match(/{(\w+)}/); if (match) { var varName = match[1]; var values = targetSources[varName] || []; var regex = new RegExp('{' + varName + '}', 'g'); if (values.length) { values.forEach(function (value) { newTargetsToProcess.push(target.replace(regex, value)); }); } else { newTargetsToProcess.push(target.replace(regex, '')); } } else { targets.push(target); } } if (/{\w+}/.test(target)) { var targetsToProcess = [target]; var newTargetsToProcess; while (targetsToProcess.length) { newTargetsToProcess = []; targetsToProcess.forEach(processTarget); targetsToProcess = newTargetsToProcess; } } else { targets.push(target); } return targets; }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | 'lang': this._languages || this._projectConfig.getLanguages() |
| ✗ Was not returned | 'lang': this._languages || this._projectConfig.getLanguages() |
| Function processTarget | |
|---|---|
| ✗ Was not called | function processTarget (target) {··· var match = target.match(/{(\w+)}/); if (match) { var varName = match[1]; var values = targetSources[varName] || []; var regex = new RegExp('{' + varName + '}', 'g'); if (values.length) { values.forEach(function (value) { newTargetsToProcess.push(target.replace(regex, value)); }); } else { newTargetsToProcess.push(target.replace(regex, '')); } } else { targets.push(target); } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (match) {··· var varName = match[1]; var values = targetSources[varName] || []; var regex = new RegExp('{' + varName + '}', 'g'); if (values.length) { values.forEach(function (value) { newTargetsToProcess.push(target.replace(regex, value)); }); } else { newTargetsToProcess.push(target.replace(regex, '')); } } else { |
| ✗ Negative was not executed (else) | } else {··· targets.push(target); } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var values = targetSources[varName] || []; |
| ✗ Was not returned | var values = targetSources[varName] || []; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (values.length) {··· values.forEach(function (value) { newTargetsToProcess.push(target.replace(regex, value)); }); } else { |
| ✗ Negative was not executed (else) | } else {··· newTargetsToProcess.push(target.replace(regex, '')); } |
| Function (anonymous_527) | |
|---|---|
| ✗ Was not called | values.forEach(function (value) {··· newTargetsToProcess.push(target.replace(regex, value)); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (/{\w+}/.test(target)) {··· var targetsToProcess = [target]; var newTargetsToProcess; while (targetsToProcess.length) { newTargetsToProcess = []; targetsToProcess.forEach(processTarget); targetsToProcess = newTargetsToProcess; } } else { |
| ✗ Negative was not executed (else) | } else {··· targets.push(target); } |
| Function (anonymous_528) | |
|---|---|
| ✗ Was not called | addTargets: function (targets) {··· var _this = this; targets.forEach(function (target) { _this.addTarget(target); }); return this; }, |
| Function (anonymous_529) | |
|---|---|
| ✗ Was not called | targets.forEach(function (target) {··· _this.addTarget(target); }); |
| Function (anonymous_530) | |
|---|---|
| ✗ Was not called | addTarget: function (target) {··· this._targets = this._targets.concat(this._processTarget(target)); return this; }, |
| Function (anonymous_531) | |
|---|---|
| ✗ Was not called | addCleanTargets: function (targets) {··· var _this = this; targets.forEach(function (target) { _this.addCleanTarget(target); }); return this; }, |
| Function (anonymous_532) | |
|---|---|
| ✗ Was not called | targets.forEach(function (target) {··· _this.addCleanTarget(target); }); |
| Function (anonymous_533) | |
|---|---|
| ✗ Was not called | addCleanTarget: function (target) {··· this._cleanTargets = this._cleanTargets.concat(this._processTarget(target)); return this; }, |
| Function (anonymous_534) | |
|---|---|
| ✗ Was not called | addTechs: function (techs) {··· var _this = this; techs.forEach(function (tech) { _this.addTech(tech); }); return this; }, |
| Function (anonymous_535) | |
|---|---|
| ✗ Was not called | techs.forEach(function (tech) {··· _this.addTech(tech); }); |
| Function (anonymous_536) | |
|---|---|
| ✗ Was not called | _processTechOptions: function (options) {··· var processLangs = false; var optVal; var i; var p; for (i in options) { if (options.hasOwnProperty(i) && typeof (optVal = options[i]) === 'string' && optVal.indexOf('{lang}') !== -1 ) { processLangs = true; break; } } if (processLangs) { var result = []; var langs = this._languages || this._projectConfig.getLanguages(); for (var j = 0, l = langs.length; j < l; j++) { var optionsForLang = {}; for (i in options) { if (options.hasOwnProperty(i)) { if (typeof (optVal = options[i]) === 'string' && (p = optVal.indexOf('{lang}')) !== -1) { optionsForLang[i] = optVal.substr(0, p) + langs[j] + optVal.substr(p + 6); } else { optionsForLang[i] = optVal; } } } result.push(optionsForLang); } return result; } else { return [options]; } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | ) {··· processLangs = true; break; } |
| ✗ Negative was not executed (else) | }··· } |
| Branch LogicalExpression | |
| ✗ Was not returned | optVal.indexOf('{lang}') !== -1 |
| ✗ Was not returned | if (options.hasOwnProperty(i) &&··· typeof (optVal = options[i]) === 'string' && |
| Branch LogicalExpression | |
| ✗ Was not returned | typeof (optVal = options[i]) === 'string' && |
| ✗ Was not returned | if (options.hasOwnProperty(i) && |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (processLangs) {··· var result = []; var langs = this._languages || this._projectConfig.getLanguages(); for (var j = 0, l = langs.length; j < l; j++) { var optionsForLang = {}; for (i in options) { if (options.hasOwnProperty(i)) { if (typeof (optVal = options[i]) === 'string' && (p = optVal.indexOf('{lang}')) !== -1) { optionsForLang[i] = optVal.substr(0, p) + langs[j] + optVal.substr(p + 6); } else { optionsForLang[i] = optVal; } } } result.push(optionsForLang); } return result; } else { |
| ✗ Negative was not executed (else) | } else {··· return [options]; } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var langs = this._languages || this._projectConfig.getLanguages(); |
| ✗ Was not returned | var langs = this._languages || this._projectConfig.getLanguages(); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (options.hasOwnProperty(i)) {··· if (typeof (optVal = options[i]) === 'string' && (p = optVal.indexOf('{lang}')) !== -1) { optionsForLang[i] = optVal.substr(0, p) + langs[j] + optVal.substr(p + 6); } else { optionsForLang[i] = optVal; } } |
| ✗ Negative was not executed (else) | }··· } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (typeof (optVal = options[i]) === 'string' && (p = optVal.indexOf('{lang}')) !== -1) {··· optionsForLang[i] = optVal.substr(0, p) + langs[j] + optVal.substr(p + 6); } else { |
| ✗ Negative was not executed (else) | } else {··· optionsForLang[i] = optVal; } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (typeof (optVal = options[i]) === 'string' && (p = optVal.indexOf('{lang}')) !== -1) { |
| ✗ Was not returned | if (typeof (optVal = options[i]) === 'string' && (p = optVal.indexOf('{lang}')) !== -1) { |
| Function (anonymous_537) | |
|---|---|
| ✗ Was not called | addTech: function (tech) {··· if (Array.isArray(tech)) { var techClass = tech[0]; var techOptions = tech[1] || {}; var techOptionList = this._processTechOptions(techOptions); for (var i = 0, l = techOptionList.length; i < l; i++) { this._techs.push(new techClass(techOptionList[i])); } } else if (typeof tech === 'function') { this._techs.push(new tech()); } else { this._techs.push(tech); } return this; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (Array.isArray(tech)) {··· var techClass = tech[0]; var techOptions = tech[1] || {}; var techOptionList = this._processTechOptions(techOptions); for (var i = 0, l = techOptionList.length; i < l; i++) { this._techs.push(new techClass(techOptionList[i])); } } else if (typeof tech === 'function') { |
| ✗ Negative was not executed (else) | } else if (typeof tech === 'function') {··· this._techs.push(new tech()); } else { this._techs.push(tech); } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var techOptions = tech[1] || {}; |
| ✗ Was not returned | var techOptions = tech[1] || {}; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (typeof tech === 'function') {··· this._techs.push(new tech()); } else { |
| ✗ Negative was not executed (else) | } else {··· this._techs.push(tech); } |
| Function (anonymous_538) | |
|---|---|
| ✗ Was not called | getTargets: function () {··· return this._targets; }, |
| Function (anonymous_539) | |
|---|---|
| ✗ Was not called | getCleanTargets: function () {··· return this._cleanTargets; }, |
| Function (anonymous_540) | |
|---|---|
| ✗ Was not called | getTechs: function () {··· return this._techs; }, |
| Function (anonymous_541) | |
|---|---|
| ✗ Was not called | getPath: function () {··· return this._path; } |
| Function (anonymous_542) | |
|---|---|
| ✗ Was not called | __constructor: function (modeName) {··· this.__base(); this._name = modeName; } |
| Function (anonymous_543) | |
|---|---|
| ✗ Was not called | __constructor: function () {··· this._chains = []; }, |
| Function (anonymous_544) | |
|---|---|
| ✗ Was not called | addChain: function (cb) {··· this._chains.push(cb); return this; }, |
| Function (anonymous_545) | |
|---|---|
| ✗ Was not called | configure: function () {··· return this.addChain.apply(this, arguments); }, |
| Function (anonymous_546) | |
|---|---|
| ✗ Was not called | exec: function (args, ctxObject) {··· args = [ctxObject || this].concat(args || []); var chains = this._chains.slice(0); function keepRunning() { var chain = chains.shift(); return chain && Vow.when(chain.apply(this, args)).then(function () { return keepRunning(); }); } return keepRunning(); } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | args = [ctxObject || this].concat(args || []); |
| ✗ Was not returned | args = [ctxObject || this].concat(args || []); |
| Branch LogicalExpression | |
| ✗ Was not returned | args = [ctxObject || this].concat(args || []); |
| ✗ Was not returned | args = [ctxObject || this].concat(args || []); |
| Function keepRunning | |
|---|---|
| ✗ Was not called | function keepRunning() {··· var chain = chains.shift(); return chain && Vow.when(chain.apply(this, args)).then(function () { return keepRunning(); }); } |
| Function (anonymous_548) | |
|---|---|
| ✗ Was not called | return chain && Vow.when(chain.apply(this, args)).then(function () {··· return keepRunning(); }); |
| Branch LogicalExpression | |
| ✗ Was not returned | return chain && Vow.when(chain.apply(this, args)).then(function () {··· return keepRunning(); }); |
| ✗ Was not returned | return chain && Vow.when(chain.apply(this, args)).then(function () { |
| Function (anonymous_549) | |
|---|---|
| ✗ Was not called | __constructor: function (mask) {··· this.__base(); this._mask = mask; }, |
| Function (anonymous_550) | |
|---|---|
| ✗ Was not called | getMask: function () {··· return this._mask; } |
| Function (anonymous_551) | |
|---|---|
| ✗ Was not called | __constructor: function (name) {··· this.__base(); this._name = name; this._makePlatform = null; this._logger = null; }, |
| Function (anonymous_552) | |
|---|---|
| ✗ Was not called | getMakePlatform: function () {··· return this._makePlatform; }, |
| Function (anonymous_553) | |
|---|---|
| ✗ Was not called | setMakePlatform: function (makePlatform) {··· this._makePlatform = makePlatform; this._logger = makePlatform.getLogger().subLogger(':' + this._name); }, |
| Function (anonymous_554) | |
|---|---|
| ✗ Was not called | log: function (msg) {··· this._logger.log(msg); }, |
| Function (anonymous_555) | |
|---|---|
| ✗ Was not called | buildTargets: function (targets) {··· return this._makePlatform.buildTargets(targets); }, |
| Function (anonymous_556) | |
|---|---|
| ✗ Was not called | buildTarget: function (target) {··· return this.buildTargets([target]); }, |
| Function (anonymous_557) | |
|---|---|
| ✗ Was not called | cleanTargets: function (targets) {··· return this._makePlatform.cleanTargets(targets); }, |
| Function (anonymous_558) | |
|---|---|
| ✗ Was not called | cleanTarget: function (target) {··· return this.cleanTargets([target]); }, |
| Function (anonymous_559) | |
|---|---|
| ✗ Was not called | shell: function (shellCmd, opts) {··· opts = opts || {}; var env = {}; var specifiedEnv = opts.env || {}; var baseEnv = this._makePlatform.getEnv() || {}; Object.keys(baseEnv).forEach(function (key) { env[key] = baseEnv[key]; }); Object.keys(specifiedEnv).forEach(function (key) { env[key] = specifiedEnv[key]; }); opts.env = env; this.log('$ ' + shellCmd); var shellProcess = childProcess.exec(shellCmd, opts); var promise = Vow.promise(); var stdout = ''; var stderr = ''; shellProcess.on('exit', function (code) { if (code === 0) { promise.fulfill([stdout, stderr]); } else { promise.reject(new Error(stderr)); } }); shellProcess.stderr.on('data', function (data) { stderr += data; console.log(data.trim()); }); shellProcess.stdout.on('data', function (data) { console.log(data.trim()); stdout += data; }); return promise; } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | opts = opts || {}; |
| ✗ Was not returned | opts = opts || {}; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var specifiedEnv = opts.env || {}; |
| ✗ Was not returned | var specifiedEnv = opts.env || {}; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var baseEnv = this._makePlatform.getEnv() || {}; |
| ✗ Was not returned | var baseEnv = this._makePlatform.getEnv() || {}; |
| Function (anonymous_560) | |
|---|---|
| ✗ Was not called | Object.keys(baseEnv).forEach(function (key) {··· env[key] = baseEnv[key]; }); |
| Function (anonymous_561) | |
|---|---|
| ✗ Was not called | Object.keys(specifiedEnv).forEach(function (key) {··· env[key] = specifiedEnv[key]; }); |
| Function (anonymous_562) | |
|---|---|
| ✗ Was not called | shellProcess.on('exit', function (code) {··· if (code === 0) { promise.fulfill([stdout, stderr]); } else { promise.reject(new Error(stderr)); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (code === 0) {··· promise.fulfill([stdout, stderr]); } else { |
| ✗ Negative was not executed (else) | } else {··· promise.reject(new Error(stderr)); } |
| Function (anonymous_563) | |
|---|---|
| ✗ Was not called | shellProcess.stderr.on('data', function (data) {··· stderr += data; console.log(data.trim()); }); |
| Function (anonymous_564) | |
|---|---|
| ✗ Was not called | shellProcess.stdout.on('data', function (data) {··· console.log(data.trim()); stdout += data; }); |
| Function (anonymous_565) | |
|---|---|
| ✓ Was called | globSync: function (path) {··· path = path.replace(/\/$/, '').replace(/^\//, ''); var pathBits = path.split('/'); var matched = ['']; var pathBit; var matchedItem; function filterDirectories(dirName) { if (dirName.charAt(0) === '.' || dirName.charAt(0) === '~') { return false; } if (dirName.match(expr)) { var fullPath = matchedItem + '/' + dirName; return fs.statSync(fullPath).isDirectory(); } else { return false; } } function buildPath(dirName) { return matchedItem + '/' + dirName; } var newMatched; while (!!(pathBit = pathBits.shift())) { newMatched = []; for (var i = 0, l = matched.length; i < l; i++) { matchedItem = matched[i]; if (~pathBit.indexOf('*')) { var expr = new RegExp(pathBit.split('*').map(escapeRegex).join('.*')); newMatched = newMatched.concat( fs.readdirSync(matchedItem || '/') .filter(filterDirectories) .map(buildPath) ); } else { var isWinStart = /^\w{1}:/.test(pathBit); matchedItem += isWinStart ? pathBit : '/' + pathBit; if (fs.existsSync(matchedItem)) { newMatched.push(matchedItem); } } } matched = newMatched; } return matched; } |
| Function filterDirectories | |
|---|---|
| ✓ Was called | function filterDirectories(dirName) {··· if (dirName.charAt(0) === '.' || dirName.charAt(0) === '~') { return false; } if (dirName.match(expr)) { var fullPath = matchedItem + '/' + dirName; return fs.statSync(fullPath).isDirectory(); } else { return false; } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (dirName.charAt(0) === '.' || dirName.charAt(0) === '~') {··· return false; } |
| ✓ Negative was executed (else) | }··· if (dirName.match(expr)) { |
| Branch LogicalExpression | |
| ✓ Was returned | if (dirName.charAt(0) === '.' || dirName.charAt(0) === '~') { |
| ✗ Was not returned | if (dirName.charAt(0) === '.' || dirName.charAt(0) === '~') { |
| Branch IfStatement | |
|---|---|
| ✓ Positive was executed (if) | if (dirName.match(expr)) {··· var fullPath = matchedItem + '/' + dirName; return fs.statSync(fullPath).isDirectory(); } else { |
| ✗ Negative was not executed (else) | } else {··· return false; } |
| Function buildPath | |
|---|---|
| ✓ Was called | function buildPath(dirName) {··· return matchedItem + '/' + dirName; } |
| Branch IfStatement | |
|---|---|
| ✓ Positive was executed (if) | if (~pathBit.indexOf('*')) {··· var expr = new RegExp(pathBit.split('*').map(escapeRegex).join('.*')); newMatched = newMatched.concat( fs.readdirSync(matchedItem || '/') .filter(filterDirectories) .map(buildPath) ); } else { |
| ✓ Negative was executed (else) | } else {··· var isWinStart = /^\w{1}:/.test(pathBit); matchedItem += isWinStart ? pathBit : '/' + pathBit; if (fs.existsSync(matchedItem)) { newMatched.push(matchedItem); } } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | fs.readdirSync(matchedItem || '/') |
| ✓ Was returned | fs.readdirSync(matchedItem || '/') |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | matchedItem += isWinStart ? pathBit : '/' + pathBit; |
| ✓ Negative was returned (: ...) | matchedItem += isWinStart ? pathBit : '/' + pathBit; |
| Branch IfStatement | |
|---|---|
| ✓ Positive was executed (if) | if (fs.existsSync(matchedItem)) {··· newMatched.push(matchedItem); } |
| ✗ Negative was not executed (else) | }··· } |
| Function escapeRegex | |
|---|---|
| ✓ Was called | function escapeRegex(value) {··· return value.replace(/[\-\[\]{}\(\)\*\+\?\.,\\\^\$\|#]/g, '\\$&'); } |
| Function (anonymous_569) | |
|---|---|
| ✗ Was not called | __constructor: function (caption) {··· this._caption = caption; this._targets = {}; }, |
| Function (anonymous_570) | |
|---|---|
| ✗ Was not called | addTarget: function (path, tech) {··· var target = this._targets[path] = this._targets[path] || {}; target.name = path; target.tech = tech; target.deps = target.deps || []; target.resolved = target.resolved || false; }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var target = this._targets[path] = this._targets[path] || {}; |
| ✗ Was not returned | var target = this._targets[path] = this._targets[path] || {}; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | target.deps = target.deps || []; |
| ✗ Was not returned | target.deps = target.deps || []; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | target.resolved = target.resolved || false; |
| ✗ Was not returned | target.resolved = target.resolved || false; |
| Function (anonymous_571) | |
|---|---|
| ✗ Was not called | resolveTarget: function (path) {··· var target = this._targets[path] = this._targets[path] || {}; target.resolved = true; }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var target = this._targets[path] = this._targets[path] || {}; |
| ✗ Was not returned | var target = this._targets[path] = this._targets[path] || {}; |
| Function (anonymous_572) | |
|---|---|
| ✗ Was not called | addDep: function (targetPath, depFromPath) {··· var target = this._targets[targetPath] = this._targets[targetPath] || {}; target.deps = target.deps || []; if (target.deps.indexOf(depFromPath) === -1) { target.deps.push(depFromPath); } }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var target = this._targets[targetPath] = this._targets[targetPath] || {}; |
| ✗ Was not returned | var target = this._targets[targetPath] = this._targets[targetPath] || {}; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | target.deps = target.deps || []; |
| ✗ Was not returned | target.deps = target.deps || []; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (target.deps.indexOf(depFromPath) === -1) {··· target.deps.push(depFromPath); } |
| ✗ Negative was not executed (else) | }··· }, |
| Function (anonymous_573) | |
|---|---|
| ✗ Was not called | render: function () {··· var res = '\n Build graph for ' + colors.bold(this._caption) + ':\n\n'; var targets = this._targets; var nonDepTargets = {}; Object.keys(targets).forEach(function (key) { if (targets[key].resolved) { nonDepTargets[key] = true; } }); Object.keys(targets).forEach(function (key) { targets[key].deps.forEach(function (depKey) { delete nonDepTargets[depKey]; }); }); var _this = this; res += Object.keys(nonDepTargets).map(function (key) { return _this.renderTarget(key, false); }).join('\n\n'); return res; }, |
| Function (anonymous_574) | |
|---|---|
| ✗ Was not called | Object.keys(targets).forEach(function (key) {··· if (targets[key].resolved) { nonDepTargets[key] = true; } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (targets[key].resolved) {··· nonDepTargets[key] = true; } |
| ✗ Negative was not executed (else) | }··· }); |
| Function (anonymous_575) | |
|---|---|
| ✗ Was not called | Object.keys(targets).forEach(function (key) {··· targets[key].deps.forEach(function (depKey) { delete nonDepTargets[depKey]; }); }); |
| Function (anonymous_576) | |
|---|---|
| ✗ Was not called | targets[key].deps.forEach(function (depKey) {··· delete nonDepTargets[depKey]; }); |
| Function (anonymous_577) | |
|---|---|
| ✗ Was not called | res += Object.keys(nonDepTargets).map(function (key) {··· return _this.renderTarget(key, false); }).join('\n\n'); |
| Function (anonymous_578) | |
|---|---|
| ✗ Was not called | renderPumlFragments: function () {··· var res = []; var packageData = {}; var targets = this._targets; Object.keys(targets).forEach(function (key) { var target = targets[key]; var packageName = path.dirname(target.name); var packageRes = (packageData[packageName] = packageData[packageName] || []); packageRes.push( '[<b>' + path.basename(target.name) + '</b>\\n' + target.tech + '] as [' + target.name + ']' ); target.deps.forEach(function (depName) { packageRes.push('[' + target.name + '] <-- [' + depName + ']'); }); }); Object.keys(packageData).forEach(function (packageName) { res.push('folder [' + packageName + '] {\n' + packageData[packageName].join('\n') + '\n}'); }); return res; }, |
| Function (anonymous_579) | |
|---|---|
| ✗ Was not called | Object.keys(targets).forEach(function (key) {··· var target = targets[key]; var packageName = path.dirname(target.name); var packageRes = (packageData[packageName] = packageData[packageName] || []); packageRes.push( '[<b>' + path.basename(target.name) + '</b>\\n' + target.tech + '] as [' + target.name + ']' ); target.deps.forEach(function (depName) { packageRes.push('[' + target.name + '] <-- [' + depName + ']'); }); }); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var packageRes = (packageData[packageName] = packageData[packageName] || []); |
| ✗ Was not returned | var packageRes = (packageData[packageName] = packageData[packageName] || []); |
| Function (anonymous_580) | |
|---|---|
| ✗ Was not called | target.deps.forEach(function (depName) {··· packageRes.push('[' + target.name + '] <-- [' + depName + ']'); }); |
| Function (anonymous_581) | |
|---|---|
| ✗ Was not called | Object.keys(packageData).forEach(function (packageName) {··· res.push('folder [' + packageName + '] {\n' + packageData[packageName].join('\n') + '\n}'); }); |
| Function (anonymous_582) | |
|---|---|
| ✗ Was not called | renderFragmentedPumlLinks: function () {··· var pumlLink = require('puml-link'); return this.renderPumlFragments().map(function (fragment) { return pumlLink.generatePumlUrl(fragment); }); }, |
| Function (anonymous_583) | |
|---|---|
| ✗ Was not called | return this.renderPumlFragments().map(function (fragment) {··· return pumlLink.generatePumlUrl(fragment); }); |
| Function (anonymous_584) | |
|---|---|
| ✗ Was not called | renderTarget: function (targetName, sub) {··· var targets = this._targets; var target = targets[targetName]; var _this = this; var subTargetsRendered = target.deps.map(function (dep) { return _this.renderTarget(dep, true); }); var targetInfo = (sub ? '- ' : '') + path.basename(target.name); var targetDir = (sub ? ' ' : '') + path.dirname(target.name); if (targetDir.length > targetInfo.length) { targetInfo += (new Array(targetDir.length - targetInfo.length + 1)).join(' '); } if (targetInfo.length > targetDir.length) { targetDir += (new Array(targetInfo.length - targetDir.length + 1)).join(' '); } if (subTargetsRendered.length > 0) { var larr = ' <-'; var targetInfoLen = targetInfo.length + larr.length; targetInfo = targetInfo + colors.grey(larr); var subTargetsLines = subTargetsRendered.join('\n\n').split('\n'); var doIndent = false; var indentStarted = false; for (var i = 0, l = subTargetsLines.length; i < l; i++) { var indentSym = subTargetsRendered.length === 1 ? ' ' : '|'; var joinSym = subTargetsRendered.length === 1 ? '-' : '+'; var line = subTargetsLines[i]; if (line.charAt(0) === '-') { indentSym = '+'; line = colors.grey('-') + line.substr(1); if (!doIndent) { doIndent = true; indentStarted = true; } } else { if (indentStarted) { doIndent = false; for (var j = i; j < l; j++) { if (subTargetsLines[j].charAt(0) === '-') { doIndent = true; } } } } var indent = doIndent ? indentSym : ' '; if (i === Math.floor(l / 2) - 1) { subTargetsLines[i] = targetInfo + colors.grey(joinSym) + line; } else if (i === Math.floor(l / 2)) { subTargetsLines[i] = colors.grey(targetDir) + ' ' + colors.grey(indent) + line; } else { subTargetsLines[i] = new Array(targetInfoLen + 1).join(' ') + colors.grey(indent) + line; } } return subTargetsLines.join('\n'); } return targetInfo + '\n' + colors.grey(targetDir); } |
| Function (anonymous_585) | |
|---|---|
| ✗ Was not called | var subTargetsRendered = target.deps.map(function (dep) {··· return _this.renderTarget(dep, true); }); |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var targetInfo = (sub ? '- ' : '') + path.basename(target.name); |
| ✗ Negative was not returned (: ...) | var targetInfo = (sub ? '- ' : '') + path.basename(target.name); |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var targetDir = (sub ? ' ' : '') + path.dirname(target.name); |
| ✗ Negative was not returned (: ...) | var targetDir = (sub ? ' ' : '') + path.dirname(target.name); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (targetDir.length > targetInfo.length) {··· targetInfo += (new Array(targetDir.length - targetInfo.length + 1)).join(' '); } |
| ✗ Negative was not executed (else) | }··· if (targetInfo.length > targetDir.length) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (targetInfo.length > targetDir.length) {··· targetDir += (new Array(targetInfo.length - targetDir.length + 1)).join(' '); } |
| ✗ Negative was not executed (else) | }··· if (subTargetsRendered.length > 0) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (subTargetsRendered.length > 0) {··· var larr = ' <-'; var targetInfoLen = targetInfo.length + larr.length; targetInfo = targetInfo + colors.grey(larr); var subTargetsLines = subTargetsRendered.join('\n\n').split('\n'); var doIndent = false; var indentStarted = false; for (var i = 0, l = subTargetsLines.length; i < l; i++) { var indentSym = subTargetsRendered.length === 1 ? ' ' : '|'; var joinSym = subTargetsRendered.length === 1 ? '-' : '+'; var line = subTargetsLines[i]; if (line.charAt(0) === '-') { indentSym = '+'; line = colors.grey('-') + line.substr(1); if (!doIndent) { doIndent = true; indentStarted = true; } } else { if (indentStarted) { doIndent = false; for (var j = i; j < l; j++) { if (subTargetsLines[j].charAt(0) === '-') { doIndent = true; } } } } var indent = doIndent ? indentSym : ' '; if (i === Math.floor(l / 2) - 1) { subTargetsLines[i] = targetInfo + colors.grey(joinSym) + line; } else if (i === Math.floor(l / 2)) { subTargetsLines[i] = colors.grey(targetDir) + ' ' + colors.grey(indent) + line; } else { subTargetsLines[i] = new Array(targetInfoLen + 1).join(' ') + colors.grey(indent) + line; } } return subTargetsLines.join('\n'); } |
| ✗ Negative was not executed (else) | }··· return targetInfo + '\n' + colors.grey(targetDir); |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var indentSym = subTargetsRendered.length === 1 ? ' ' : '|'; |
| ✗ Negative was not returned (: ...) | var indentSym = subTargetsRendered.length === 1 ? ' ' : '|'; |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var joinSym = subTargetsRendered.length === 1 ? '-' : '+'; |
| ✗ Negative was not returned (: ...) | var joinSym = subTargetsRendered.length === 1 ? '-' : '+'; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (line.charAt(0) === '-') {··· indentSym = '+'; line = colors.grey('-') + line.substr(1); if (!doIndent) { doIndent = true; indentStarted = true; } } else { |
| ✗ Negative was not executed (else) | } else {··· if (indentStarted) { doIndent = false; for (var j = i; j < l; j++) { if (subTargetsLines[j].charAt(0) === '-') { doIndent = true; } } } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!doIndent) {··· doIndent = true; indentStarted = true; } |
| ✗ Negative was not executed (else) | }··· } else { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (indentStarted) {··· doIndent = false; for (var j = i; j < l; j++) { if (subTargetsLines[j].charAt(0) === '-') { doIndent = true; } } } |
| ✗ Negative was not executed (else) | }··· } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (subTargetsLines[j].charAt(0) === '-') {··· doIndent = true; } |
| ✗ Negative was not executed (else) | }··· } |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var indent = doIndent ? indentSym : ' '; |
| ✗ Negative was not returned (: ...) | var indent = doIndent ? indentSym : ' '; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (i === Math.floor(l / 2) - 1) {··· subTargetsLines[i] = targetInfo + colors.grey(joinSym) + line; } else if (i === Math.floor(l / 2)) { |
| ✗ Negative was not executed (else) | } else if (i === Math.floor(l / 2)) {··· subTargetsLines[i] = colors.grey(targetDir) + ' ' + colors.grey(indent) + line; } else { subTargetsLines[i] = new Array(targetInfoLen + 1).join(' ') + colors.grey(indent) + line; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | } else if (i === Math.floor(l / 2)) {··· subTargetsLines[i] = colors.grey(targetDir) + ' ' + colors.grey(indent) + line; } else { |
| ✗ Negative was not executed (else) | } else {··· subTargetsLines[i] = new Array(targetInfoLen + 1).join(' ') + colors.grey(indent) + line; } |
| Function (anonymous_587) | |
|---|---|
| ✗ Was not called | .action(function (options) {··· var opts = { port: options.port || 8080, host: options.host || '0.0.0.0', socket: options.socket }; var server = new Server(); Vow.when(server.init(cdir, opts)).then((function () { return server.run(); })).then(null, function (err) { console.error(err.stack); process.exit(1); }); }); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | port: options.port || 8080, |
| ✗ Was not returned | port: options.port || 8080, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | host: options.host || '0.0.0.0', |
| ✗ Was not returned | host: options.host || '0.0.0.0', |
| Function (anonymous_588) | |
|---|---|
| ✗ Was not called | Vow.when(server.init(cdir, opts)).then((function () {··· return server.run(); })).then(null, function (err) { |
| Function (anonymous_589) | |
|---|---|
| ✗ Was not called | })).then(null, function (err) {··· console.error(err.stack); process.exit(1); }); |
| Function (anonymous_590) | |
|---|---|
| ✗ Was not called | init: function (cdir, options) {··· this._port = options.port; this._host = options.host; this._socket = options.socket; this._options = options; this._options.cdir = cdir; }, |
| Function (anonymous_591) | |
|---|---|
| ✗ Was not called | run: function () {··· var _this = this; var app = connect(); app.use(middleware.createMiddleware(_this._options)); app.use(serveStatic(_this._options.cdir)); app.use(function (req, res, next) { if (req.method === 'GET' && req.url === '/') { _this._indexPage(req, res); } else { next(); } }); process.on('uncaughtException', function (err) { console.log(err.stack); }); var socket; function serverStarted() { console.log('Server started at ' + socket); } if (_this._socket) { try { fs.unlinkSync(_this._socket); } catch (e) {} socket = _this._socket; app.listen(_this._socket, function () { fs.chmod(_this._socket, '0777'); serverStarted(); }); } else { socket = 'http://' + _this._host + ':' + _this._port; app.listen(_this._port, _this._host, serverStarted); } }, |
| Function (anonymous_592) | |
|---|---|
| ✗ Was not called | app.use(function (req, res, next) {··· if (req.method === 'GET' && req.url === '/') { _this._indexPage(req, res); } else { next(); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (req.method === 'GET' && req.url === '/') {··· _this._indexPage(req, res); } else { |
| ✗ Negative was not executed (else) | } else {··· next(); } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (req.method === 'GET' && req.url === '/') { |
| ✗ Was not returned | if (req.method === 'GET' && req.url === '/') { |
| Function (anonymous_593) | |
|---|---|
| ✗ Was not called | process.on('uncaughtException', function (err) {··· console.log(err.stack); }); |
| Function serverStarted | |
|---|---|
| ✗ Was not called | function serverStarted() {··· console.log('Server started at ' + socket); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (_this._socket) {··· try { fs.unlinkSync(_this._socket); } catch (e) {} socket = _this._socket; app.listen(_this._socket, function () { fs.chmod(_this._socket, '0777'); serverStarted(); }); } else { |
| ✗ Negative was not executed (else) | } else {··· socket = 'http://' + _this._host + ':' + _this._port; app.listen(_this._port, _this._host, serverStarted); } |
| Function (anonymous_595) | |
|---|---|
| ✗ Was not called | app.listen(_this._socket, function () {··· fs.chmod(_this._socket, '0777'); serverStarted(); }); |
| Function (anonymous_596) | |
|---|---|
| ✗ Was not called | _indexPage: function (req, res) {··· var projectName = path.basename(this._options.cdir || process.cwd()); var makePlatform = new MakePlatform(); makePlatform.init(this._options.cdir).done(function () { makePlatform.loadCache(); return makePlatform.buildTargets([]).then(function () { var htmlPages = []; var nodeConfigs = makePlatform.getProjectConfig().getNodeConfigs(); Object.keys(nodeConfigs).forEach(function (nodeConfigPath) { var nodeConfig = nodeConfigs[nodeConfigPath]; nodeConfig.getTargets().forEach(function (target) { if (target.match(/\.html$/)) { htmlPages.push(nodeConfig.getPath() + '/' + target); } }); }); var html = ['<!DOCTYPE HTML>']; html.push('<html>'); html.push('<head>'); html.push(' <title>' + projectName + '</title>'); html.push(' <style>'); html.push( 'body {' + ' margin: 0;' + ' padding: 80px 100px;' + ' font: 13px "Helvetica Neue", "Lucida Grande", "Arial";' + ' background: #fff;' + ' background-repeat: no-repeat;' + ' color: #555;' + ' -webkit-font-smoothing: antialiased;' + '}' ); html.push( 'h1 {' + ' margin: 0;' + ' font-size: 60px;' + ' color: #343434;' + '}' ); html.push( 'h2 {' + ' margin: 40px 0px 10px;' + ' font-size: 20px;' + ' color: #343434;' + '}' ); html.push( 'a {' + ' color: #555;' + '}' + 'a:hover {' + ' color: #303030;' + '}' ); html.push( 'ul {' + ' margin: 0;' + ' padding: 0;' + '}' + 'ul li {' + ' margin: 5px 0;' + ' list-style: none;' + ' font-size: 16px;' + '}' + 'ul li a:before {' + ' display: inline-block;' + ' width: 16px;' + ' height: 16px;' + ' background: url(data:image/png;base64,' + 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA0ElEQVR42o2TzwqCQBCHfaneplOHrj1AB5+' + 'iNwg6R50Cjd4ggv4JhXfB27IK5uRvQNjGdseBjx1m5/cpghERMXEc0wiWHRHocz+Cuq7JWjugqipXsvAKUF' + 'mWSTBGsD8/HTOvIM9zSR90sV5BURQDRLHEKyjLMoQuMMYw1/PtX68L8MUP24SmkzndL0+AHjPc6YJkd0SAz' + '6ZpgDsLC16PNy+uVxsShRnusBN+g3R/wiKfXMOZVyADeBoQQl2AQlD2ukApXYCfqW3bENjxC8biCr5jjTCh' + 'qbabBgAAAABJRU5ErkJggg==);' + ' margin-right: 5px;' + ' content: "";' + ' vertical-align: bottom;' + '}' ); html.push(' </style>'); html.push('</head>'); html.push('<body>'); html.push('<h1>' + projectName + '</h1>'); if (htmlPages.length > 0) { html.push('<h2>Available pages</h2>'); html.push('<ul>'); htmlPages.forEach(function (htmlPage) { html.push('<li><a href="' + htmlPage + '">' + htmlPage + '</a></li>'); }); html.push('</ul>'); } else { html.push('No pages are configured'); } html.push('<h2>Graph</h2>'); html.push('<ul>'); makePlatform.getBuildGraph().renderFragmentedPumlLinks().forEach(function (graphLink) { html.push( '<li>' + '<img src="' + graphLink + '" />' + '</li>' ); }); html.push('</ul>'); html.push('<h2>More info</h2>'); html.push('<div><a href="https://github.com/enb-make/enb">ENB Readme</a></div>'); html.push('</body>'); html.push('</html>'); res.end(html.join('\n')); }); }); } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var projectName = path.basename(this._options.cdir || process.cwd()); |
| ✗ Was not returned | var projectName = path.basename(this._options.cdir || process.cwd()); |
| Function (anonymous_597) | |
|---|---|
| ✗ Was not called | makePlatform.init(this._options.cdir).done(function () {··· makePlatform.loadCache(); return makePlatform.buildTargets([]).then(function () { var htmlPages = []; var nodeConfigs = makePlatform.getProjectConfig().getNodeConfigs(); Object.keys(nodeConfigs).forEach(function (nodeConfigPath) { var nodeConfig = nodeConfigs[nodeConfigPath]; nodeConfig.getTargets().forEach(function (target) { if (target.match(/\.html$/)) { htmlPages.push(nodeConfig.getPath() + '/' + target); } }); }); var html = ['<!DOCTYPE HTML>']; html.push('<html>'); html.push('<head>'); html.push(' <title>' + projectName + '</title>'); html.push(' <style>'); html.push( 'body {' + ' margin: 0;' + ' padding: 80px 100px;' + ' font: 13px "Helvetica Neue", "Lucida Grande", "Arial";' + ' background: #fff;' + ' background-repeat: no-repeat;' + ' color: #555;' + ' -webkit-font-smoothing: antialiased;' + '}' ); html.push( 'h1 {' + ' margin: 0;' + ' font-size: 60px;' + ' color: #343434;' + '}' ); html.push( 'h2 {' + ' margin: 40px 0px 10px;' + ' font-size: 20px;' + ' color: #343434;' + '}' ); html.push( 'a {' + ' color: #555;' + '}' + 'a:hover {' + ' color: #303030;' + '}' ); html.push( 'ul {' + ' margin: 0;' + ' padding: 0;' + '}' + 'ul li {' + ' margin: 5px 0;' + ' list-style: none;' + ' font-size: 16px;' + '}' + 'ul li a:before {' + ' display: inline-block;' + ' width: 16px;' + ' height: 16px;' + ' background: url(data:image/png;base64,' + 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA0ElEQVR42o2TzwqCQBCHfaneplOHrj1AB5+' + 'iNwg6R50Cjd4ggv4JhXfB27IK5uRvQNjGdseBjx1m5/cpghERMXEc0wiWHRHocz+Cuq7JWjugqipXsvAKUF' + 'mWSTBGsD8/HTOvIM9zSR90sV5BURQDRLHEKyjLMoQuMMYw1/PtX68L8MUP24SmkzndL0+AHjPc6YJkd0SAz' + '6ZpgDsLC16PNy+uVxsShRnusBN+g3R/wiKfXMOZVyADeBoQQl2AQlD2ukApXYCfqW3bENjxC8biCr5jjTCh' + 'qbabBgAAAABJRU5ErkJggg==);' + ' margin-right: 5px;' + ' content: "";' + ' vertical-align: bottom;' + '}' ); html.push(' </style>'); html.push('</head>'); html.push('<body>'); html.push('<h1>' + projectName + '</h1>'); if (htmlPages.length > 0) { html.push('<h2>Available pages</h2>'); html.push('<ul>'); htmlPages.forEach(function (htmlPage) { html.push('<li><a href="' + htmlPage + '">' + htmlPage + '</a></li>'); }); html.push('</ul>'); } else { html.push('No pages are configured'); } html.push('<h2>Graph</h2>'); html.push('<ul>'); makePlatform.getBuildGraph().renderFragmentedPumlLinks().forEach(function (graphLink) { html.push( '<li>' + '<img src="' + graphLink + '" />' + '</li>' ); }); html.push('</ul>'); html.push('<h2>More info</h2>'); html.push('<div><a href="https://github.com/enb-make/enb">ENB Readme</a></div>'); html.push('</body>'); html.push('</html>'); res.end(html.join('\n')); }); }); |
| Function (anonymous_598) | |
|---|---|
| ✗ Was not called | return makePlatform.buildTargets([]).then(function () {··· var htmlPages = []; var nodeConfigs = makePlatform.getProjectConfig().getNodeConfigs(); Object.keys(nodeConfigs).forEach(function (nodeConfigPath) { var nodeConfig = nodeConfigs[nodeConfigPath]; nodeConfig.getTargets().forEach(function (target) { if (target.match(/\.html$/)) { htmlPages.push(nodeConfig.getPath() + '/' + target); } }); }); var html = ['<!DOCTYPE HTML>']; html.push('<html>'); html.push('<head>'); html.push(' <title>' + projectName + '</title>'); html.push(' <style>'); html.push( 'body {' + ' margin: 0;' + ' padding: 80px 100px;' + ' font: 13px "Helvetica Neue", "Lucida Grande", "Arial";' + ' background: #fff;' + ' background-repeat: no-repeat;' + ' color: #555;' + ' -webkit-font-smoothing: antialiased;' + '}' ); html.push( 'h1 {' + ' margin: 0;' + ' font-size: 60px;' + ' color: #343434;' + '}' ); html.push( 'h2 {' + ' margin: 40px 0px 10px;' + ' font-size: 20px;' + ' color: #343434;' + '}' ); html.push( 'a {' + ' color: #555;' + '}' + 'a:hover {' + ' color: #303030;' + '}' ); html.push( 'ul {' + ' margin: 0;' + ' padding: 0;' + '}' + 'ul li {' + ' margin: 5px 0;' + ' list-style: none;' + ' font-size: 16px;' + '}' + 'ul li a:before {' + ' display: inline-block;' + ' width: 16px;' + ' height: 16px;' + ' background: url(data:image/png;base64,' + 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA0ElEQVR42o2TzwqCQBCHfaneplOHrj1AB5+' + 'iNwg6R50Cjd4ggv4JhXfB27IK5uRvQNjGdseBjx1m5/cpghERMXEc0wiWHRHocz+Cuq7JWjugqipXsvAKUF' + 'mWSTBGsD8/HTOvIM9zSR90sV5BURQDRLHEKyjLMoQuMMYw1/PtX68L8MUP24SmkzndL0+AHjPc6YJkd0SAz' + '6ZpgDsLC16PNy+uVxsShRnusBN+g3R/wiKfXMOZVyADeBoQQl2AQlD2ukApXYCfqW3bENjxC8biCr5jjTCh' + 'qbabBgAAAABJRU5ErkJggg==);' + ' margin-right: 5px;' + ' content: "";' + ' vertical-align: bottom;' + '}' ); html.push(' </style>'); html.push('</head>'); html.push('<body>'); html.push('<h1>' + projectName + '</h1>'); if (htmlPages.length > 0) { html.push('<h2>Available pages</h2>'); html.push('<ul>'); htmlPages.forEach(function (htmlPage) { html.push('<li><a href="' + htmlPage + '">' + htmlPage + '</a></li>'); }); html.push('</ul>'); } else { html.push('No pages are configured'); } html.push('<h2>Graph</h2>'); html.push('<ul>'); makePlatform.getBuildGraph().renderFragmentedPumlLinks().forEach(function (graphLink) { html.push( '<li>' + '<img src="' + graphLink + '" />' + '</li>' ); }); html.push('</ul>'); html.push('<h2>More info</h2>'); html.push('<div><a href="https://github.com/enb-make/enb">ENB Readme</a></div>'); html.push('</body>'); html.push('</html>'); res.end(html.join('\n')); }); |
| Function (anonymous_599) | |
|---|---|
| ✗ Was not called | Object.keys(nodeConfigs).forEach(function (nodeConfigPath) {··· var nodeConfig = nodeConfigs[nodeConfigPath]; nodeConfig.getTargets().forEach(function (target) { if (target.match(/\.html$/)) { htmlPages.push(nodeConfig.getPath() + '/' + target); } }); }); |
| Function (anonymous_600) | |
|---|---|
| ✗ Was not called | nodeConfig.getTargets().forEach(function (target) {··· if (target.match(/\.html$/)) { htmlPages.push(nodeConfig.getPath() + '/' + target); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (target.match(/\.html$/)) {··· htmlPages.push(nodeConfig.getPath() + '/' + target); } |
| ✗ Negative was not executed (else) | }··· }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (htmlPages.length > 0) {··· html.push('<h2>Available pages</h2>'); html.push('<ul>'); htmlPages.forEach(function (htmlPage) { html.push('<li><a href="' + htmlPage + '">' + htmlPage + '</a></li>'); }); html.push('</ul>'); } else { |
| ✗ Negative was not executed (else) | } else {··· html.push('No pages are configured'); } |
| Function (anonymous_601) | |
|---|---|
| ✗ Was not called | htmlPages.forEach(function (htmlPage) {··· html.push('<li><a href="' + htmlPage + '">' + htmlPage + '</a></li>'); }); |
| Function (anonymous_602) | |
|---|---|
| ✗ Was not called | makePlatform.getBuildGraph().renderFragmentedPumlLinks().forEach(function (graphLink) {··· html.push( '<li>' + '<img src="' + graphLink + '" />' + '</li>' ); }); |
| Function (anonymous_603) | |
|---|---|
| ✗ Was not called | module.exports.createMiddleware = function (options) {··· var builder = this.createBuilder(options); return function (req, res, next) { var dt = new Date(); var pathname = req._parsedUrl.pathname; builder(pathname).then(function (filename) { try { var mimeType = mime.lookup(filename); var mimeCharset = mimeType === 'application/javascript' ? 'UTF-8' : mime.charsets.lookup(mimeType, null); res.setHeader('Content-Type', mimeType + (mimeCharset ? '; charset=' + mimeCharset : '')); send(req, filename).pipe(res); console.log('----- ' + pathname + ' ' + (new Date() - dt) + 'ms'); } catch (err) { next(err); } }, function (err) { if (err instanceof TargetNotFoundError) { next(); } else { next(err); } }); }; }; |
| Function (anonymous_604) | |
|---|---|
| ✗ Was not called | return function (req, res, next) {··· var dt = new Date(); var pathname = req._parsedUrl.pathname; builder(pathname).then(function (filename) { try { var mimeType = mime.lookup(filename); var mimeCharset = mimeType === 'application/javascript' ? 'UTF-8' : mime.charsets.lookup(mimeType, null); res.setHeader('Content-Type', mimeType + (mimeCharset ? '; charset=' + mimeCharset : '')); send(req, filename).pipe(res); console.log('----- ' + pathname + ' ' + (new Date() - dt) + 'ms'); } catch (err) { next(err); } }, function (err) { if (err instanceof TargetNotFoundError) { next(); } else { next(err); } }); }; |
| Function (anonymous_605) | |
|---|---|
| ✗ Was not called | builder(pathname).then(function (filename) {··· try { var mimeType = mime.lookup(filename); var mimeCharset = mimeType === 'application/javascript' ? 'UTF-8' : mime.charsets.lookup(mimeType, null); res.setHeader('Content-Type', mimeType + (mimeCharset ? '; charset=' + mimeCharset : '')); send(req, filename).pipe(res); console.log('----- ' + pathname + ' ' + (new Date() - dt) + 'ms'); } catch (err) { next(err); } }, function (err) { |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | 'UTF-8' : |
| ✗ Negative was not returned (: ...) | mime.charsets.lookup(mimeType, null); |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | res.setHeader('Content-Type', mimeType + (mimeCharset ? '; charset=' + mimeCharset : '')); |
| ✗ Negative was not returned (: ...) | res.setHeader('Content-Type', mimeType + (mimeCharset ? '; charset=' + mimeCharset : '')); |
| Function (anonymous_606) | |
|---|---|
| ✗ Was not called | }, function (err) {··· if (err instanceof TargetNotFoundError) { next(); } else { next(err); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (err instanceof TargetNotFoundError) {··· next(); } else { |
| ✗ Negative was not executed (else) | } else {··· next(err); } |
| Function (anonymous_607) | |
|---|---|
| ✗ Was not called | module.exports.createBuilder = function (options) {··· options = options || {}; options.cdir = options.cdir || process.cwd(); return function (path) { var makePlatform = new MakePlatform(); var targetPath = path.replace(/^\/+|\/$/g, ''); return makePlatform.init(options.cdir).then(function () { makePlatform.loadCache(); var logger = new Logger(targetPath + ' - '); if (options.noLog) { logger.setEnabled(false); } makePlatform.setLogger(logger); return makePlatform.buildTargets([targetPath]).then(function () { makePlatform.saveCache(); makePlatform.destruct(); return options.cdir + '/' + targetPath; }); }); }; }; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | options = options || {}; |
| ✗ Was not returned | options = options || {}; |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | options.cdir = options.cdir || process.cwd(); |
| ✗ Was not returned | options.cdir = options.cdir || process.cwd(); |
| Function (anonymous_608) | |
|---|---|
| ✗ Was not called | return function (path) {··· var makePlatform = new MakePlatform(); var targetPath = path.replace(/^\/+|\/$/g, ''); return makePlatform.init(options.cdir).then(function () { makePlatform.loadCache(); var logger = new Logger(targetPath + ' - '); if (options.noLog) { logger.setEnabled(false); } makePlatform.setLogger(logger); return makePlatform.buildTargets([targetPath]).then(function () { makePlatform.saveCache(); makePlatform.destruct(); return options.cdir + '/' + targetPath; }); }); }; |
| Function (anonymous_609) | |
|---|---|
| ✗ Was not called | return makePlatform.init(options.cdir).then(function () {··· makePlatform.loadCache(); var logger = new Logger(targetPath + ' - '); if (options.noLog) { logger.setEnabled(false); } makePlatform.setLogger(logger); return makePlatform.buildTargets([targetPath]).then(function () { makePlatform.saveCache(); makePlatform.destruct(); return options.cdir + '/' + targetPath; }); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (options.noLog) {··· logger.setEnabled(false); } |
| ✗ Negative was not executed (else) | }··· makePlatform.setLogger(logger); |
| Function (anonymous_610) | |
|---|---|
| ✗ Was not called | return makePlatform.buildTargets([targetPath]).then(function () {··· makePlatform.saveCache(); makePlatform.destruct(); return options.cdir + '/' + targetPath; }); |
| Function (anonymous_612) | |
|---|---|
| ✗ Was not called | .action(function () {··· var args = program.args.slice(0); args.pop(); var filename = args.shift(); if (!filename) { console.log('Filename is not specified'); return; } filename = require.resolve(filename); shell('sh', ['-c', 'node ' + path.resolve(__dirname, '../../node_modules/madify/bin/madify') + ' "' + filename + '" | ' + path.resolve(__dirname, '../../node_modules/mad/bin/mad') + ' -'], function () { process.exit(0); } ); }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!filename) {··· console.log('Filename is not specified'); return; } |
| ✗ Negative was not executed (else) | }··· filename = require.resolve(filename); |
| Function (anonymous_613) | |
|---|---|
| ✗ Was not called | function () {··· process.exit(0); } |
| Function shell | |
|---|---|
| ✗ Was not called | function shell(cmd, opts, callback) {··· var p; process.stdin.pause(); process.stdin.setRawMode(false); p = spawn(cmd, opts, { customFds: [0, 1, 2] }); return p.on('exit', function () { process.stdin.setRawMode(true); process.stdin.resume(); if (callback) { callback(); } }); } |
| Function (anonymous_615) | |
|---|---|
| ✗ Was not called | return p.on('exit', function () {··· process.stdin.setRawMode(true); process.stdin.resume(); if (callback) { callback(); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (callback) {··· callback(); } |
| ✗ Negative was not executed (else) | }··· }); |
| Function (anonymous_616) | |
|---|---|
| ✗ Was not called | __constructor: function () {··· this.__base(); }, |
| Function (anonymous_617) | |
|---|---|
| ✗ Was not called | getName: function () {··· throw new Error('You sould override "getName" method of module.'); }, |
| Function (anonymous_618) | |
|---|---|
| ✗ Was not called | exec: function (args, ctxObject) {··· args = [ctxObject || this].concat(args || []); var chains = this._chains; function keepRunning() { var chain = chains.shift(); return chain && Vow.when(chain.apply(this, args)).then(function () { return keepRunning(); }); } return keepRunning(); } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | args = [ctxObject || this].concat(args || []); |
| ✗ Was not returned | args = [ctxObject || this].concat(args || []); |
| Branch LogicalExpression | |
| ✗ Was not returned | args = [ctxObject || this].concat(args || []); |
| ✗ Was not returned | args = [ctxObject || this].concat(args || []); |
| Function keepRunning | |
|---|---|
| ✗ Was not called | function keepRunning() {··· var chain = chains.shift(); return chain && Vow.when(chain.apply(this, args)).then(function () { return keepRunning(); }); } |
| Function (anonymous_620) | |
|---|---|
| ✗ Was not called | return chain && Vow.when(chain.apply(this, args)).then(function () {··· return keepRunning(); }); |
| Branch LogicalExpression | |
| ✗ Was not returned | return chain && Vow.when(chain.apply(this, args)).then(function () {··· return keepRunning(); }); |
| ✗ Was not returned | return chain && Vow.when(chain.apply(this, args)).then(function () { |
| Function (anonymous_621) | |
|---|---|
| ✗ Was not called | buildLevel: function (levelPath, levelBuilder) {··· return Vow.when(addPlainFiles(levelPath, levelBuilder)).then(function () { levelBuilder.build(); }); }, |
| Function (anonymous_622) | |
|---|---|
| ✗ Was not called | return Vow.when(addPlainFiles(levelPath, levelBuilder)).then(function () {··· levelBuilder.build(); }); |
| Function (anonymous_623) | |
|---|---|
| ✗ Was not called | buildFilePath: function (levelPath, blockName, elemName, modName, modVal) {··· return levelPath + '/' + blockName + (elemName ? '__' + elemName : '') + (modName ? '_' + modName : '') + (modVal ? '_' + modVal : ''); } |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | (elemName ? '__' + elemName : '') + |
| ✗ Negative was not returned (: ...) | (elemName ? '__' + elemName : '') + |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | (modName ? '_' + modName : '') + |
| ✗ Negative was not returned (: ...) | (modName ? '_' + modName : '') + |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | (modVal ? '_' + modVal : ''); |
| ✗ Negative was not returned (: ...) | (modVal ? '_' + modVal : ''); |
| Function addPlainFiles | |
|---|---|
| ✗ Was not called | function addPlainFiles(directory, levelBuilder) {··· filterFiles(fs.readdirSync(directory)).forEach(function (filename) { var fullname = directory + '/' + filename; var stat = fs.statSync(fullname); var bem; if (stat.isDirectory()) { if (filename.indexOf('.') !== -1) { bem = FileList.parseFilename(filename).bem; levelBuilder.addFile(fullname, bem.block, bem.elem, bem.modName, bem.modVal); } else { addPlainFiles(fullname, levelBuilder); } } else { bem = FileList.parseFilename(filename).bem; levelBuilder.addFile(fullname, bem.block, bem.elem, bem.modName, bem.modVal); } }); } |
| Function (anonymous_625) | |
|---|---|
| ✗ Was not called | filterFiles(fs.readdirSync(directory)).forEach(function (filename) {··· var fullname = directory + '/' + filename; var stat = fs.statSync(fullname); var bem; if (stat.isDirectory()) { if (filename.indexOf('.') !== -1) { bem = FileList.parseFilename(filename).bem; levelBuilder.addFile(fullname, bem.block, bem.elem, bem.modName, bem.modVal); } else { addPlainFiles(fullname, levelBuilder); } } else { bem = FileList.parseFilename(filename).bem; levelBuilder.addFile(fullname, bem.block, bem.elem, bem.modName, bem.modVal); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (stat.isDirectory()) {··· if (filename.indexOf('.') !== -1) { bem = FileList.parseFilename(filename).bem; levelBuilder.addFile(fullname, bem.block, bem.elem, bem.modName, bem.modVal); } else { addPlainFiles(fullname, levelBuilder); } } else { |
| ✗ Negative was not executed (else) | } else {··· bem = FileList.parseFilename(filename).bem; levelBuilder.addFile(fullname, bem.block, bem.elem, bem.modName, bem.modVal); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (filename.indexOf('.') !== -1) {··· bem = FileList.parseFilename(filename).bem; levelBuilder.addFile(fullname, bem.block, bem.elem, bem.modName, bem.modVal); } else { |
| ✗ Negative was not executed (else) | } else {··· addPlainFiles(fullname, levelBuilder); } |
| Function filterFiles | |
|---|---|
| ✗ Was not called | function filterFiles(filenames) {··· return filenames.filter(function (filename) { return filename.charAt(0) !== '.'; }); } |
| Function (anonymous_627) | |
|---|---|
| ✗ Was not called | return filenames.filter(function (filename) {··· return filename.charAt(0) !== '.'; }); |
| Function (anonymous_628) | |
|---|---|
| ✗ Was not called | init: function () {··· this.__base.apply(this, arguments); this._filesTarget = this.node.unmaskTargetName(this.getOption('filesTarget', '?.files')); }, |
| Function (anonymous_629) | |
|---|---|
| ✗ Was not called | getDestSuffixes: function () {··· throw new Error('You are required to override getDestSuffixes method of FileAssembleTech.'); }, |
| Function (anonymous_630) | |
|---|---|
| ✗ Was not called | getSourceSuffixes: function () {··· throw new Error('You are required to override getSourceSuffixes method of FileAssembleTech.'); }, |
| Function (anonymous_631) | |
|---|---|
| ✗ Was not called | getTargetName: function (suffix) {··· return this.node.getTargetName(suffix); }, |
| Function (anonymous_632) | |
|---|---|
| ✗ Was not called | getTargets: function () {··· var _this = this; return this.getDestSuffixes().map(function (suffix) { return _this.getTargetName(suffix); }); }, |
| Function (anonymous_633) | |
|---|---|
| ✗ Was not called | return this.getDestSuffixes().map(function (suffix) {··· return _this.getTargetName(suffix); }); |
| Function (anonymous_634) | |
|---|---|
| ✗ Was not called | isRebuildRequired: function (suffix) {··· var target = this.getTargetName(suffix); return this.node.getNodeCache(target).needRebuildFile('file', this.node.resolvePath(target)); }, |
| Function (anonymous_635) | |
|---|---|
| ✗ Was not called | cacheSuffixInfo: function (suffix) {··· var target = this.getTargetName(suffix); this.node.getNodeCache(target).cacheFileInfo('file', this.node.resolvePath(target)); }, |
| Function (anonymous_636) | |
|---|---|
| ✗ Was not called | buildResultCached: function (sourceFiles, suffix) {··· var target = this.getTargetName(suffix); var cache = this.node.getNodeCache(target); var _this = this; if (this.isRebuildRequired(suffix) || cache.needRebuildFileList('file-list', sourceFiles)) { return Vow.when(this.buildResult(sourceFiles, suffix)) .then(function () { _this.cacheSuffixInfo(suffix); cache.cacheFileList('file-list', sourceFiles); _this.node.resolveTarget(target); }); } else { _this.node.isValidTarget(target); _this.node.resolveTarget(target); return Vow.fulfill(); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this.isRebuildRequired(suffix) || cache.needRebuildFileList('file-list', sourceFiles)) {··· return Vow.when(this.buildResult(sourceFiles, suffix)) .then(function () { _this.cacheSuffixInfo(suffix); cache.cacheFileList('file-list', sourceFiles); _this.node.resolveTarget(target); }); } else { |
| ✗ Negative was not executed (else) | } else {··· _this.node.isValidTarget(target); _this.node.resolveTarget(target); return Vow.fulfill(); } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (this.isRebuildRequired(suffix) || cache.needRebuildFileList('file-list', sourceFiles)) { |
| ✗ Was not returned | if (this.isRebuildRequired(suffix) || cache.needRebuildFileList('file-list', sourceFiles)) { |
| Function (anonymous_637) | |
|---|---|
| ✗ Was not called | .then(function () {··· _this.cacheSuffixInfo(suffix); cache.cacheFileList('file-list', sourceFiles); _this.node.resolveTarget(target); }); |
| Function (anonymous_638) | |
|---|---|
| ✗ Was not called | buildResult: function (sourceFiles, suffix) {··· var _this = this; try { return Vow.when(this.getBuildResult(sourceFiles, suffix)) .then(function (content) { return vowFs.write(_this.node.resolvePath(_this.getTargetName(suffix)), content, 'utf8'); }); } catch (err) { return Vow.reject(err); } }, |
| Function (anonymous_639) | |
|---|---|
| ✗ Was not called | .then(function (content) {··· return vowFs.write(_this.node.resolvePath(_this.getTargetName(suffix)), content, 'utf8'); }); |
| Function (anonymous_640) | |
|---|---|
| ✗ Was not called | getBuildResult: function () {··· throw new Error('You are required to override getBuildResult method of FileAssembleTech.'); }, |
| Function (anonymous_641) | |
|---|---|
| ✗ Was not called | buildResults: function (sourceFiles, suffixes) {··· var _this = this; return Vow.all(suffixes.map(function (suffix) { return _this.buildResultCached(sourceFiles, suffix); })); }, |
| Function (anonymous_642) | |
|---|---|
| ✗ Was not called | return Vow.all(suffixes.map(function (suffix) {··· return _this.buildResultCached(sourceFiles, suffix); })); |
| Function (anonymous_643) | |
|---|---|
| ✗ Was not called | writeFile: function (filename, content) {··· return vowFs.write(filename, content, 'utf8'); }, |
| Function (anonymous_644) | |
|---|---|
| ✗ Was not called | filterSourceFiles: function (files) {··· return files; }, |
| Function (anonymous_645) | |
|---|---|
| ✗ Was not called | build: function () {··· var _this = this; return this.node.requireSources([this._filesTarget]).spread(function (files) { var sourceSuffixes = _this.getSourceSuffixes() || []; var sourceFiles = sourceSuffixes.length ? files.getBySuffix(sourceSuffixes) : []; sourceFiles = _this.filterSourceFiles(sourceFiles); return Vow.when(_this.getDestSuffixes()).then(function (suffixes) { return _this.buildResults(sourceFiles, suffixes); }); }); } |
| Function (anonymous_646) | |
|---|---|
| ✗ Was not called | return this.node.requireSources([this._filesTarget]).spread(function (files) {··· var sourceSuffixes = _this.getSourceSuffixes() || []; var sourceFiles = sourceSuffixes.length ? files.getBySuffix(sourceSuffixes) : []; sourceFiles = _this.filterSourceFiles(sourceFiles); return Vow.when(_this.getDestSuffixes()).then(function (suffixes) { return _this.buildResults(sourceFiles, suffixes); }); }); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | var sourceSuffixes = _this.getSourceSuffixes() || []; |
| ✗ Was not returned | var sourceSuffixes = _this.getSourceSuffixes() || []; |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var sourceFiles = sourceSuffixes.length ? files.getBySuffix(sourceSuffixes) : []; |
| ✗ Negative was not returned (: ...) | var sourceFiles = sourceSuffixes.length ? files.getBySuffix(sourceSuffixes) : []; |
| Function (anonymous_647) | |
|---|---|
| ✗ Was not called | return Vow.when(_this.getDestSuffixes()).then(function (suffixes) {··· return _this.buildResults(sourceFiles, suffixes); }); |
| Function (anonymous_648) | |
|---|---|
| ✗ Was not called | __constructor: function (fileSystemStructure, root) {··· this._structure = fileSystemStructure; this._root = root || process.cwd(); this._originalFsFunctions = null; this._originalAsyncFsFunctions = null; }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | this._root = root || process.cwd(); |
| ✗ Was not returned | this._root = root || process.cwd(); |
| Function (anonymous_649) | |
|---|---|
| ✗ Was not called | setup: function () {··· var mocks = createMocks(this._structure, this._root); this._originalAsyncFsFunctions = {}; for (var asyncFsMethodName in asyncFs) { this._originalAsyncFsFunctions[asyncFsMethodName] = asyncFs[asyncFsMethodName]; // Заменяем пустой функцией для безопасности. asyncFs[asyncFsMethodName] = createEmptyFunction(asyncFsMethodName); } for (var asyncFsMockName in mocks.vowFs) { asyncFs[asyncFsMockName] = mocks.vowFs[asyncFsMockName]; } this._originalFsFunctions = {}; for (var fsMethodName in fs) { this._originalFsFunctions[fsMethodName] = fs[fsMethodName]; // Заменяем пустой функцией для безопасности. fs[fsMethodName] = createEmptyFunction(fsMethodName); } for (var fsMockName in mocks.fs) { fs[fsMockName] = mocks.fs[fsMockName]; } }, |
| Function (anonymous_650) | |
|---|---|
| ✗ Was not called | teardown: function () {··· for (var asyncFsMethodName in this._originalAsyncFsFunctions) { asyncFs[asyncFsMethodName] = this._originalAsyncFsFunctions[asyncFsMethodName]; } for (var fsMethodName in this._originalFsFunctions) { fs[fsMethodName] = this._originalFsFunctions[fsMethodName]; } } |
| Function createEmptyFunction | |
|---|---|
| ✗ Was not called | function createEmptyFunction(methodName) {··· return function () { throw new Error('Mock `' + methodName + '` is not implemented.'); }; } |
| Function (anonymous_652) | |
|---|---|
| ✗ Was not called | return function () {··· throw new Error('Mock `' + methodName + '` is not implemented.'); }; |
| Function createMocks | |
|---|---|
| ✗ Was not called | function createMocks (structure, root) {··· var timeObj = new Date(); function isAbsolutePath(filePath) { return filePath.charAt(0) === '/'; } function getRelativePath(filePath) { if (isAbsolutePath(filePath)) { if (filePath.indexOf(root + '/') === 0) { return filePath.replace(root + '/', ''); } else { return null; } } else { return filePath; } } function getNodeName(node) { if (node.directory) { return node.directory; } else { return node.file; } } function getNode(filePath) { filePath = getRelativePath(filePath); var pathBits = filePath.split('/'); var nodeItems = structure; var currentPathBit; var foundNode; while (Boolean(currentPathBit = pathBits.shift())) { if (!nodeItems) { return null; } foundNode = null; for (var i = 0; i < nodeItems.length; i++) { var subNode = nodeItems[i]; if (getNodeName(subNode) === currentPathBit) { foundNode = subNode; } } if (!foundNode) { return null; } nodeItems = foundNode.items; } return foundNode; } function isFile(node) { return !!node.file; } function isDirectory(node) { return !!node.directory; } function isSocket() { return false; } function isSymLink() { return false; } function createFileNotFoundError(filename) { return new Error('File not found: ' + filename + ' (' + getRelativePath(filename) + ')'); } function createIsDirectoryError(filename) { return new Error('Path is a directory: ' + filename); } function createIsFileError(filename) { return new Error('Path is a file: ' + filename); } function createFileNode(name, content) { return {file: name, content: content}; } function createDirectoryNode(name) { return {directory: name, items: []}; } function createStats(node) { return { uid: 0, gid: 0, isFile: function () { return isFile(node); }, isDirectory: function () { return isDirectory(node); }, isSymbolicLink: function () { return isSymLink(node); }, isSocket: function () { return isSocket(node); }, size: node.content ? node.content.length : 0, atime: timeObj, mtime: timeObj, ctime: timeObj }; } return { vowFs: { read: function (filename) { try { return vow.fulfill(this._readSync(filename)); } catch (e) { return vow.reject(e); } }, _readSync: function (filename) { var node = getNode(filename); if (node) { if (isFile(node)) { return node.content; } else { throw createIsDirectoryError(filename); } } else { throw createFileNotFoundError(filename); } }, write: function (filename, content) { var node = getNode(filename); if (node) { if (isFile(node)) { node.content = content; return vow.resolve(); } else { return vow.reject(createIsDirectoryError(filename)); } } else { var parentNode = getNode(path.dirname(filename)); if (parentNode) { if (isDirectory(parentNode)) { parentNode.items.push(createFileNode(path.basename(filename), content)); return vow.resolve(); } else { return vow.reject(createIsFileError(filename)); } } else { return vow.reject(createFileNotFoundError(filename)); } } }, append: function (filename, data) { return this.read(filename, function (content) { return this.write(filename, content + data); }.bind(this)); }, remove: function (filename) { var node = getNode(filename); if (node) { if (isFile(node)) { var parentNode = getNode(path.basename(filename)); parentNode.items.splice(parentNode.items.indexOf(node), 1); return vow.fulfill(); } else { return vow.reject(createIsDirectoryError(filename)); } } else { return vow.reject(createFileNotFoundError(filename)); } }, removeDir: function (dirPath) { var node = getNode(dirPath); if (node) { if (isDirectory(node)) { var parentNode = getNode(path.basename(dirPath)); parentNode.items.splice(parentNode.items.indexOf(node), 1); return vow.fulfill(); } else { return vow.reject(createIsFileError(dirPath)); } } else { return vow.reject(createFileNotFoundError(dirPath)); } }, move: function (source, dest) { return this.copy(source, dest).then(function () { return this.isFile(source).then(function (isFile) { return isFile ? this.remove(source) : this.removeDir(source); }.bind(this)); }.bind(this)); }, copy: function (source, dest) { var node = getNode(source); var destNode = getNode(dest); if (destNode) { var destParentNode = getNode(path.basename(dest)); destParentNode.items.splice(destParentNode.items.indexOf(destNode), 1); } if (node) { if (isFile(node)) { return this.read(source).then(function (data) { return this.write(dest, data); }.bind(this)); } else { return this.makeDir(dest).then(function () { return this.listDir(source).then(function (filenames) { return vow.all(filenames.map(function (filename) { return this.copy(source + '/' + filename, dest + '/' + filename); }, this)); }.bind(this)); }.bind(this)); } } else { throw createFileNotFoundError(source); } }, listDir: function (dirPath) { var node = getNode(dirPath); if (node) { if (isDirectory(node)) { return vow.fulfill(node.items.map(function (subNode) { return getNodeName(subNode); })); } else { return vow.reject(createIsFileError(dirPath)); } } else { return vow.reject(createFileNotFoundError(dirPath)); } }, makeDir: function (dirPath) { var node = getNode(dirPath); if (node) { if (isFile(node)) { return vow.reject(createIsFileError(dirPath)); } else { return vow.fulfill(); } } else { var parentDirPath = path.basename(dirPath); return this.makeDir(parentDirPath).then(function () { var parentNode = getNode(parentDirPath); var childNode = getNode(dirPath); if (childNode && parentNode.items.indexOf(childNode) !== -1) { if (isDirectory(childNode)) { return vow.fulfill(); } else { return vow.reject(createIsFileError(dirPath)); } } else { parentNode.items.push(createDirectoryNode(path.basename(dirPath))); return vow.fulfill(); } }); } }, isFile: function (filename) { var node = getNode(filename); if (node) { return vow.fulfill(isFile(node)); } else { return vow.reject(createFileNotFoundError(filename)); } }, isDir: function (filename) { var node = getNode(filename); if (node) { return vow.fulfill(isDirectory(node)); } else { return vow.reject(createFileNotFoundError(filename)); } }, isSocket: function (filename) { var node = getNode(filename); if (node) { return vow.fulfill(isSocket(node)); } else { return vow.reject(createFileNotFoundError(filename)); } }, isSymLink: function (filename) { var node = getNode(filename); if (node) { return vow.fulfill(isSymLink(node)); } else { return vow.reject(createFileNotFoundError(filename)); } }, exists: function (filename) { return vow.fulfill(Boolean(getNode(filename))); }, absolute: function (filename) { return vow.fulfill(path.resolve(root, filename)); }, chown: function () { return vow.fulfill(); // не поддерживаем права }, chmod: function () { return vow.fulfill(); // не поддерживаем права }, stats: function (filename) { var node = getNode(filename); if (node) { return vow.fulfill(createStats(node)); } else { return vow.reject(createFileNotFoundError(filename)); } }, link: function () { return vow.fulfill(); // не поддерживаем ссылки }, symLink: function () { return vow.fulfill(); // не поддерживаем ссылки } }, fs: { existsSync: function (filename) { return Boolean(getNode(filename)); }, statSync: function (filename) { var node = getNode(filename); if (node) { return createStats(node); } else { throw createFileNotFoundError(filename); } }, readdir: function (dirPath, callback) { var node = getNode(dirPath); if (!node) { return callback(createFileNotFoundError(dirPath)); } if (!isDirectory(node)) { return callback(createIsFileError(dirPath)); } callback(undefined, node.items.map(function (subNode) { return getNodeName(subNode); })); }, readdirSync: function (dirPath) { var node = getNode(dirPath); if (node) { if (isDirectory(node)) { return node.items.map(function (subNode) { return getNodeName(subNode); }); } else { throw createIsFileError(dirPath); } } else { throw createFileNotFoundError(dirPath); } }, realpathSync: function (destPath) { return path.resolve(process.cwd(), destPath); }, readFileSync: function (filename) { var node = getNode(filename); if (node) { if (isFile(node)) { return node.content; } else { throw createIsDirectoryError(filename); } } else { throw createFileNotFoundError(filename); } } } }; } |
| Function isAbsolutePath | |
|---|---|
| ✗ Was not called | function isAbsolutePath(filePath) {··· return filePath.charAt(0) === '/'; } |
| Function getRelativePath | |
|---|---|
| ✗ Was not called | function getRelativePath(filePath) {··· if (isAbsolutePath(filePath)) { if (filePath.indexOf(root + '/') === 0) { return filePath.replace(root + '/', ''); } else { return null; } } else { return filePath; } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isAbsolutePath(filePath)) {··· if (filePath.indexOf(root + '/') === 0) { return filePath.replace(root + '/', ''); } else { return null; } } else { |
| ✗ Negative was not executed (else) | } else {··· return filePath; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (filePath.indexOf(root + '/') === 0) {··· return filePath.replace(root + '/', ''); } else { |
| ✗ Negative was not executed (else) | } else {··· return null; } |
| Function getNodeName | |
|---|---|
| ✗ Was not called | function getNodeName(node) {··· if (node.directory) { return node.directory; } else { return node.file; } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node.directory) {··· return node.directory; } else { |
| ✗ Negative was not executed (else) | } else {··· return node.file; } |
| Function getNode | |
|---|---|
| ✗ Was not called | function getNode(filePath) {··· filePath = getRelativePath(filePath); var pathBits = filePath.split('/'); var nodeItems = structure; var currentPathBit; var foundNode; while (Boolean(currentPathBit = pathBits.shift())) { if (!nodeItems) { return null; } foundNode = null; for (var i = 0; i < nodeItems.length; i++) { var subNode = nodeItems[i]; if (getNodeName(subNode) === currentPathBit) { foundNode = subNode; } } if (!foundNode) { return null; } nodeItems = foundNode.items; } return foundNode; } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!nodeItems) {··· return null; } |
| ✗ Negative was not executed (else) | }··· foundNode = null; |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (getNodeName(subNode) === currentPathBit) {··· foundNode = subNode; } |
| ✗ Negative was not executed (else) | }··· } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!foundNode) {··· return null; } |
| ✗ Negative was not executed (else) | }··· nodeItems = foundNode.items; |
| Function isFile | |
|---|---|
| ✗ Was not called | function isFile(node) {··· return !!node.file; } |
| Function isDirectory | |
|---|---|
| ✗ Was not called | function isDirectory(node) {··· return !!node.directory; } |
| Function isSocket | |
|---|---|
| ✗ Was not called | function isSocket() {··· return false; } |
| Function isSymLink | |
|---|---|
| ✗ Was not called | function isSymLink() {··· return false; } |
| Function createFileNotFoundError | |
|---|---|
| ✗ Was not called | function createFileNotFoundError(filename) {··· return new Error('File not found: ' + filename + ' (' + getRelativePath(filename) + ')'); } |
| Function createIsDirectoryError | |
|---|---|
| ✗ Was not called | function createIsDirectoryError(filename) {··· return new Error('Path is a directory: ' + filename); } |
| Function createIsFileError | |
|---|---|
| ✗ Was not called | function createIsFileError(filename) {··· return new Error('Path is a file: ' + filename); } |
| Function createFileNode | |
|---|---|
| ✗ Was not called | function createFileNode(name, content) {··· return {file: name, content: content}; } |
| Function createDirectoryNode | |
|---|---|
| ✗ Was not called | function createDirectoryNode(name) {··· return {directory: name, items: []}; } |
| Function createStats | |
|---|---|
| ✗ Was not called | function createStats(node) {··· return { uid: 0, gid: 0, isFile: function () { return isFile(node); }, isDirectory: function () { return isDirectory(node); }, isSymbolicLink: function () { return isSymLink(node); }, isSocket: function () { return isSocket(node); }, size: node.content ? node.content.length : 0, atime: timeObj, mtime: timeObj, ctime: timeObj }; } |
| Function (anonymous_668) | |
|---|---|
| ✗ Was not called | isFile: function () {··· return isFile(node); }, |
| Function (anonymous_669) | |
|---|---|
| ✗ Was not called | isDirectory: function () {··· return isDirectory(node); }, |
| Function (anonymous_670) | |
|---|---|
| ✗ Was not called | isSymbolicLink: function () {··· return isSymLink(node); }, |
| Function (anonymous_671) | |
|---|---|
| ✗ Was not called | isSocket: function () {··· return isSocket(node); }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | size: node.content ? node.content.length : 0, |
| ✗ Negative was not returned (: ...) | size: node.content ? node.content.length : 0, |
| Function (anonymous_672) | |
|---|---|
| ✗ Was not called | read: function (filename) {··· try { return vow.fulfill(this._readSync(filename)); } catch (e) { return vow.reject(e); } }, |
| Function (anonymous_673) | |
|---|---|
| ✗ Was not called | _readSync: function (filename) {··· var node = getNode(filename); if (node) { if (isFile(node)) { return node.content; } else { throw createIsDirectoryError(filename); } } else { throw createFileNotFoundError(filename); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· if (isFile(node)) { return node.content; } else { throw createIsDirectoryError(filename); } } else { |
| ✗ Negative was not executed (else) | } else {··· throw createFileNotFoundError(filename); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isFile(node)) {··· return node.content; } else { |
| ✗ Negative was not executed (else) | } else {··· throw createIsDirectoryError(filename); } |
| Function (anonymous_674) | |
|---|---|
| ✗ Was not called | write: function (filename, content) {··· var node = getNode(filename); if (node) { if (isFile(node)) { node.content = content; return vow.resolve(); } else { return vow.reject(createIsDirectoryError(filename)); } } else { var parentNode = getNode(path.dirname(filename)); if (parentNode) { if (isDirectory(parentNode)) { parentNode.items.push(createFileNode(path.basename(filename), content)); return vow.resolve(); } else { return vow.reject(createIsFileError(filename)); } } else { return vow.reject(createFileNotFoundError(filename)); } } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· if (isFile(node)) { node.content = content; return vow.resolve(); } else { return vow.reject(createIsDirectoryError(filename)); } } else { |
| ✗ Negative was not executed (else) | } else {··· var parentNode = getNode(path.dirname(filename)); if (parentNode) { if (isDirectory(parentNode)) { parentNode.items.push(createFileNode(path.basename(filename), content)); return vow.resolve(); } else { return vow.reject(createIsFileError(filename)); } } else { return vow.reject(createFileNotFoundError(filename)); } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isFile(node)) {··· node.content = content; return vow.resolve(); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createIsDirectoryError(filename)); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (parentNode) {··· if (isDirectory(parentNode)) { parentNode.items.push(createFileNode(path.basename(filename), content)); return vow.resolve(); } else { return vow.reject(createIsFileError(filename)); } } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createFileNotFoundError(filename)); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isDirectory(parentNode)) {··· parentNode.items.push(createFileNode(path.basename(filename), content)); return vow.resolve(); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createIsFileError(filename)); } |
| Function (anonymous_675) | |
|---|---|
| ✗ Was not called | append: function (filename, data) {··· return this.read(filename, function (content) { return this.write(filename, content + data); }.bind(this)); }, |
| Function (anonymous_676) | |
|---|---|
| ✗ Was not called | return this.read(filename, function (content) {··· return this.write(filename, content + data); }.bind(this)); |
| Function (anonymous_677) | |
|---|---|
| ✗ Was not called | remove: function (filename) {··· var node = getNode(filename); if (node) { if (isFile(node)) { var parentNode = getNode(path.basename(filename)); parentNode.items.splice(parentNode.items.indexOf(node), 1); return vow.fulfill(); } else { return vow.reject(createIsDirectoryError(filename)); } } else { return vow.reject(createFileNotFoundError(filename)); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· if (isFile(node)) { var parentNode = getNode(path.basename(filename)); parentNode.items.splice(parentNode.items.indexOf(node), 1); return vow.fulfill(); } else { return vow.reject(createIsDirectoryError(filename)); } } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createFileNotFoundError(filename)); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isFile(node)) {··· var parentNode = getNode(path.basename(filename)); parentNode.items.splice(parentNode.items.indexOf(node), 1); return vow.fulfill(); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createIsDirectoryError(filename)); } |
| Function (anonymous_678) | |
|---|---|
| ✗ Was not called | removeDir: function (dirPath) {··· var node = getNode(dirPath); if (node) { if (isDirectory(node)) { var parentNode = getNode(path.basename(dirPath)); parentNode.items.splice(parentNode.items.indexOf(node), 1); return vow.fulfill(); } else { return vow.reject(createIsFileError(dirPath)); } } else { return vow.reject(createFileNotFoundError(dirPath)); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· if (isDirectory(node)) { var parentNode = getNode(path.basename(dirPath)); parentNode.items.splice(parentNode.items.indexOf(node), 1); return vow.fulfill(); } else { return vow.reject(createIsFileError(dirPath)); } } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createFileNotFoundError(dirPath)); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isDirectory(node)) {··· var parentNode = getNode(path.basename(dirPath)); parentNode.items.splice(parentNode.items.indexOf(node), 1); return vow.fulfill(); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createIsFileError(dirPath)); } |
| Function (anonymous_679) | |
|---|---|
| ✗ Was not called | move: function (source, dest) {··· return this.copy(source, dest).then(function () { return this.isFile(source).then(function (isFile) { return isFile ? this.remove(source) : this.removeDir(source); }.bind(this)); }.bind(this)); }, |
| Function (anonymous_680) | |
|---|---|
| ✗ Was not called | return this.copy(source, dest).then(function () {··· return this.isFile(source).then(function (isFile) { return isFile ? this.remove(source) : this.removeDir(source); }.bind(this)); }.bind(this)); |
| Function (anonymous_681) | |
|---|---|
| ✗ Was not called | return this.isFile(source).then(function (isFile) {··· return isFile ? this.remove(source) : this.removeDir(source); }.bind(this)); |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return isFile ? this.remove(source) : this.removeDir(source); |
| ✗ Negative was not returned (: ...) | return isFile ? this.remove(source) : this.removeDir(source); |
| Function (anonymous_682) | |
|---|---|
| ✗ Was not called | copy: function (source, dest) {··· var node = getNode(source); var destNode = getNode(dest); if (destNode) { var destParentNode = getNode(path.basename(dest)); destParentNode.items.splice(destParentNode.items.indexOf(destNode), 1); } if (node) { if (isFile(node)) { return this.read(source).then(function (data) { return this.write(dest, data); }.bind(this)); } else { return this.makeDir(dest).then(function () { return this.listDir(source).then(function (filenames) { return vow.all(filenames.map(function (filename) { return this.copy(source + '/' + filename, dest + '/' + filename); }, this)); }.bind(this)); }.bind(this)); } } else { throw createFileNotFoundError(source); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (destNode) {··· var destParentNode = getNode(path.basename(dest)); destParentNode.items.splice(destParentNode.items.indexOf(destNode), 1); } |
| ✗ Negative was not executed (else) | }··· if (node) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· if (isFile(node)) { return this.read(source).then(function (data) { return this.write(dest, data); }.bind(this)); } else { return this.makeDir(dest).then(function () { return this.listDir(source).then(function (filenames) { return vow.all(filenames.map(function (filename) { return this.copy(source + '/' + filename, dest + '/' + filename); }, this)); }.bind(this)); }.bind(this)); } } else { |
| ✗ Negative was not executed (else) | } else {··· throw createFileNotFoundError(source); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isFile(node)) {··· return this.read(source).then(function (data) { return this.write(dest, data); }.bind(this)); } else { |
| ✗ Negative was not executed (else) | } else {··· return this.makeDir(dest).then(function () { return this.listDir(source).then(function (filenames) { return vow.all(filenames.map(function (filename) { return this.copy(source + '/' + filename, dest + '/' + filename); }, this)); }.bind(this)); }.bind(this)); } |
| Function (anonymous_683) | |
|---|---|
| ✗ Was not called | return this.read(source).then(function (data) {··· return this.write(dest, data); }.bind(this)); |
| Function (anonymous_684) | |
|---|---|
| ✗ Was not called | return this.makeDir(dest).then(function () {··· return this.listDir(source).then(function (filenames) { return vow.all(filenames.map(function (filename) { return this.copy(source + '/' + filename, dest + '/' + filename); }, this)); }.bind(this)); }.bind(this)); |
| Function (anonymous_685) | |
|---|---|
| ✗ Was not called | return this.listDir(source).then(function (filenames) {··· return vow.all(filenames.map(function (filename) { return this.copy(source + '/' + filename, dest + '/' + filename); }, this)); }.bind(this)); |
| Function (anonymous_686) | |
|---|---|
| ✗ Was not called | return vow.all(filenames.map(function (filename) {··· return this.copy(source + '/' + filename, dest + '/' + filename); }, this)); |
| Function (anonymous_687) | |
|---|---|
| ✗ Was not called | listDir: function (dirPath) {··· var node = getNode(dirPath); if (node) { if (isDirectory(node)) { return vow.fulfill(node.items.map(function (subNode) { return getNodeName(subNode); })); } else { return vow.reject(createIsFileError(dirPath)); } } else { return vow.reject(createFileNotFoundError(dirPath)); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· if (isDirectory(node)) { return vow.fulfill(node.items.map(function (subNode) { return getNodeName(subNode); })); } else { return vow.reject(createIsFileError(dirPath)); } } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createFileNotFoundError(dirPath)); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isDirectory(node)) {··· return vow.fulfill(node.items.map(function (subNode) { return getNodeName(subNode); })); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createIsFileError(dirPath)); } |
| Function (anonymous_688) | |
|---|---|
| ✗ Was not called | return vow.fulfill(node.items.map(function (subNode) {··· return getNodeName(subNode); })); |
| Function (anonymous_689) | |
|---|---|
| ✗ Was not called | makeDir: function (dirPath) {··· var node = getNode(dirPath); if (node) { if (isFile(node)) { return vow.reject(createIsFileError(dirPath)); } else { return vow.fulfill(); } } else { var parentDirPath = path.basename(dirPath); return this.makeDir(parentDirPath).then(function () { var parentNode = getNode(parentDirPath); var childNode = getNode(dirPath); if (childNode && parentNode.items.indexOf(childNode) !== -1) { if (isDirectory(childNode)) { return vow.fulfill(); } else { return vow.reject(createIsFileError(dirPath)); } } else { parentNode.items.push(createDirectoryNode(path.basename(dirPath))); return vow.fulfill(); } }); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· if (isFile(node)) { return vow.reject(createIsFileError(dirPath)); } else { return vow.fulfill(); } } else { |
| ✗ Negative was not executed (else) | } else {··· var parentDirPath = path.basename(dirPath); return this.makeDir(parentDirPath).then(function () { var parentNode = getNode(parentDirPath); var childNode = getNode(dirPath); if (childNode && parentNode.items.indexOf(childNode) !== -1) { if (isDirectory(childNode)) { return vow.fulfill(); } else { return vow.reject(createIsFileError(dirPath)); } } else { parentNode.items.push(createDirectoryNode(path.basename(dirPath))); return vow.fulfill(); } }); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isFile(node)) {··· return vow.reject(createIsFileError(dirPath)); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.fulfill(); } |
| Function (anonymous_690) | |
|---|---|
| ✗ Was not called | return this.makeDir(parentDirPath).then(function () {··· var parentNode = getNode(parentDirPath); var childNode = getNode(dirPath); if (childNode && parentNode.items.indexOf(childNode) !== -1) { if (isDirectory(childNode)) { return vow.fulfill(); } else { return vow.reject(createIsFileError(dirPath)); } } else { parentNode.items.push(createDirectoryNode(path.basename(dirPath))); return vow.fulfill(); } }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (childNode && parentNode.items.indexOf(childNode) !== -1) {··· if (isDirectory(childNode)) { return vow.fulfill(); } else { return vow.reject(createIsFileError(dirPath)); } } else { |
| ✗ Negative was not executed (else) | } else {··· parentNode.items.push(createDirectoryNode(path.basename(dirPath))); return vow.fulfill(); } |
| Branch LogicalExpression | |
| ✗ Was not returned | if (childNode && parentNode.items.indexOf(childNode) !== -1) { |
| ✗ Was not returned | if (childNode && parentNode.items.indexOf(childNode) !== -1) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isDirectory(childNode)) {··· return vow.fulfill(); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createIsFileError(dirPath)); } |
| Function (anonymous_691) | |
|---|---|
| ✗ Was not called | isFile: function (filename) {··· var node = getNode(filename); if (node) { return vow.fulfill(isFile(node)); } else { return vow.reject(createFileNotFoundError(filename)); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· return vow.fulfill(isFile(node)); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createFileNotFoundError(filename)); } |
| Function (anonymous_692) | |
|---|---|
| ✗ Was not called | isDir: function (filename) {··· var node = getNode(filename); if (node) { return vow.fulfill(isDirectory(node)); } else { return vow.reject(createFileNotFoundError(filename)); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· return vow.fulfill(isDirectory(node)); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createFileNotFoundError(filename)); } |
| Function (anonymous_693) | |
|---|---|
| ✗ Was not called | isSocket: function (filename) {··· var node = getNode(filename); if (node) { return vow.fulfill(isSocket(node)); } else { return vow.reject(createFileNotFoundError(filename)); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· return vow.fulfill(isSocket(node)); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createFileNotFoundError(filename)); } |
| Function (anonymous_694) | |
|---|---|
| ✗ Was not called | isSymLink: function (filename) {··· var node = getNode(filename); if (node) { return vow.fulfill(isSymLink(node)); } else { return vow.reject(createFileNotFoundError(filename)); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· return vow.fulfill(isSymLink(node)); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createFileNotFoundError(filename)); } |
| Function (anonymous_695) | |
|---|---|
| ✗ Was not called | exists: function (filename) {··· return vow.fulfill(Boolean(getNode(filename))); }, |
| Function (anonymous_696) | |
|---|---|
| ✗ Was not called | absolute: function (filename) {··· return vow.fulfill(path.resolve(root, filename)); }, |
| Function (anonymous_697) | |
|---|---|
| ✗ Was not called | chown: function () {··· return vow.fulfill(); // не поддерживаем права }, |
| Function (anonymous_698) | |
|---|---|
| ✗ Was not called | chmod: function () {··· return vow.fulfill(); // не поддерживаем права }, |
| Function (anonymous_699) | |
|---|---|
| ✗ Was not called | stats: function (filename) {··· var node = getNode(filename); if (node) { return vow.fulfill(createStats(node)); } else { return vow.reject(createFileNotFoundError(filename)); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· return vow.fulfill(createStats(node)); } else { |
| ✗ Negative was not executed (else) | } else {··· return vow.reject(createFileNotFoundError(filename)); } |
| Function (anonymous_700) | |
|---|---|
| ✗ Was not called | link: function () {··· return vow.fulfill(); // не поддерживаем ссылки }, |
| Function (anonymous_701) | |
|---|---|
| ✗ Was not called | symLink: function () {··· return vow.fulfill(); // не поддерживаем ссылки } |
| Function (anonymous_702) | |
|---|---|
| ✗ Was not called | existsSync: function (filename) {··· return Boolean(getNode(filename)); }, |
| Function (anonymous_703) | |
|---|---|
| ✗ Was not called | statSync: function (filename) {··· var node = getNode(filename); if (node) { return createStats(node); } else { throw createFileNotFoundError(filename); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· return createStats(node); } else { |
| ✗ Negative was not executed (else) | } else {··· throw createFileNotFoundError(filename); } |
| Function (anonymous_704) | |
|---|---|
| ✗ Was not called | readdir: function (dirPath, callback) {··· var node = getNode(dirPath); if (!node) { return callback(createFileNotFoundError(dirPath)); } if (!isDirectory(node)) { return callback(createIsFileError(dirPath)); } callback(undefined, node.items.map(function (subNode) { return getNodeName(subNode); })); }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!node) {··· return callback(createFileNotFoundError(dirPath)); } |
| ✗ Negative was not executed (else) | }··· if (!isDirectory(node)) { |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!isDirectory(node)) {··· return callback(createIsFileError(dirPath)); } |
| ✗ Negative was not executed (else) | }··· callback(undefined, node.items.map(function (subNode) { |
| Function (anonymous_705) | |
|---|---|
| ✗ Was not called | callback(undefined, node.items.map(function (subNode) {··· return getNodeName(subNode); })); |
| Function (anonymous_706) | |
|---|---|
| ✗ Was not called | readdirSync: function (dirPath) {··· var node = getNode(dirPath); if (node) { if (isDirectory(node)) { return node.items.map(function (subNode) { return getNodeName(subNode); }); } else { throw createIsFileError(dirPath); } } else { throw createFileNotFoundError(dirPath); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· if (isDirectory(node)) { return node.items.map(function (subNode) { return getNodeName(subNode); }); } else { throw createIsFileError(dirPath); } } else { |
| ✗ Negative was not executed (else) | } else {··· throw createFileNotFoundError(dirPath); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isDirectory(node)) {··· return node.items.map(function (subNode) { return getNodeName(subNode); }); } else { |
| ✗ Negative was not executed (else) | } else {··· throw createIsFileError(dirPath); } |
| Function (anonymous_707) | |
|---|---|
| ✗ Was not called | return node.items.map(function (subNode) {··· return getNodeName(subNode); }); |
| Function (anonymous_708) | |
|---|---|
| ✗ Was not called | realpathSync: function (destPath) {··· return path.resolve(process.cwd(), destPath); }, |
| Function (anonymous_709) | |
|---|---|
| ✗ Was not called | readFileSync: function (filename) {··· var node = getNode(filename); if (node) { if (isFile(node)) { return node.content; } else { throw createIsDirectoryError(filename); } } else { throw createFileNotFoundError(filename); } } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (node) {··· if (isFile(node)) { return node.content; } else { throw createIsDirectoryError(filename); } } else { |
| ✗ Negative was not executed (else) | } else {··· throw createFileNotFoundError(filename); } |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (isFile(node)) {··· return node.content; } else { |
| ✗ Negative was not executed (else) | } else {··· throw createIsDirectoryError(filename); } |
| Function (anonymous_710) | |
|---|---|
| ✗ Was not called | __constructor: function (scope) {··· this._messages = []; this._enabled = true; this._scope = scope || ''; }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | this._scope = scope || ''; |
| ✗ Was not returned | this._scope = scope || ''; |
| Function (anonymous_711) | |
|---|---|
| ✗ Was not called | log: function (msg, scope, action) {··· if (this._enabled) { this._messages.push({ message: msg, scope: scope, action: action }); } }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (this._enabled) {··· this._messages.push({ message: msg, scope: scope, action: action }); } |
| ✗ Negative was not executed (else) | }··· }, |
| Function (anonymous_712) | |
|---|---|
| ✗ Was not called | logAction: function (action, target, additionalInfo) {··· this.log( additionalInfo, (this._scope && (this._scope + '/')) + target, action ); }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (this._scope && (this._scope + '/')) + target, |
| ✗ Was not returned | (this._scope && (this._scope + '/')) + target, |
| Function (anonymous_713) | |
|---|---|
| ✗ Was not called | logTechIsDeprecated: function (deprecatedTech, thisPackage, newTech, newPackage, desc) {··· this.logWarningAction('deprecated', 'Tech ' + thisPackage + '/techs/' + deprecatedTech + ' is deprecated.' + (newTech && newPackage ? ' ' + (newPackage === thisPackage ? 'Use ' : 'Install package ' + newPackage + ' and use ' ) + 'tech ' + newPackage + '/techs/' + newTech + ' instead' : '' ) + desc ); }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | ' ' +··· (newPackage === thisPackage ? 'Use ' : 'Install package ' + newPackage + ' and use ' ) + 'tech ' + newPackage + '/techs/' + newTech + ' instead' : |
| ✗ Negative was not returned (: ...) | '' |
| Branch LogicalExpression | |
| ✗ Was not returned | (newTech && newPackage ? |
| ✗ Was not returned | (newTech && newPackage ? |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | 'Use ' : |
| ✗ Negative was not returned (: ...) | 'Install package ' + newPackage + ' and use ' |
| Function (anonymous_714) | |
|---|---|
| ✗ Was not called | logWarningAction: function (action, msg) {··· this.log(action, '', msg); }, |
| Function (anonymous_715) | |
|---|---|
| ✗ Was not called | logErrorAction: function (action, target, additionalInfo) {··· this.log( additionalInfo, (this._scope && (this._scope + '/')) + target, action ); }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | (this._scope && (this._scope + '/')) + target, |
| ✗ Was not returned | (this._scope && (this._scope + '/')) + target, |
| Function (anonymous_716) | |
|---|---|
| ✗ Was not called | isValid: function (target, tech) {··· this.logAction('isValid', target, tech); }, |
| Function (anonymous_717) | |
|---|---|
| ✗ Was not called | logClean: function (target) {··· this.logAction('clean', target); }, |
| Function (anonymous_718) | |
|---|---|
| ✗ Was not called | setEnabled: function (enabled) {··· this._enabled = enabled; }, |
| Function (anonymous_719) | |
|---|---|
| ✗ Was not called | isEnabled: function () {··· return this._enabled; }, |
| Function (anonymous_720) | |
|---|---|
| ✗ Was not called | subLogger: function (scope) {··· var res = new TestLogger(this._scope + (scope.charAt(0) === ':' ? scope : (this._scope && '/') + scope)); res.setEnabled(this._enabled); return res; } |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var res = new TestLogger(this._scope + (scope.charAt(0) === ':' ? scope : (this._scope && '/') + scope)); |
| ✗ Negative was not returned (: ...) | var res = new TestLogger(this._scope + (scope.charAt(0) === ':' ? scope : (this._scope && '/') + scope)); |
| Branch LogicalExpression | |
| ✗ Was not returned | var res = new TestLogger(this._scope + (scope.charAt(0) === ':' ? scope : (this._scope && '/') + scope)); |
| ✗ Was not returned | var res = new TestLogger(this._scope + (scope.charAt(0) === ':' ? scope : (this._scope && '/') + scope)); |
| Function (anonymous_721) | |
|---|---|
| ✗ Was not called | __constructor: function (nodePath) {··· this._languages = []; this._logger = new TestLogger(nodePath); this._root = process.cwd(); this._path = nodePath; this._dirname = this._root + '/' + nodePath; this._targetName = path.basename(nodePath); this._buildPromise = vow.promise(); this._buildPromises = []; this._nodeCache = new Cache(new CacheStorage(), nodePath); this._techData = {}; this._resultTechData = {}; this._nodeTechData = {}; this._levelNamingSchemes = {}; this.buildState = {}; }, |
| Function (anonymous_722) | |
|---|---|
| ✗ Was not called | getLanguages: function () {··· return this._languages; }, |
| Function (anonymous_723) | |
|---|---|
| ✗ Was not called | setLanguages: function (languages) {··· this._languages = languages; }, |
| Function (anonymous_724) | |
|---|---|
| ✗ Was not called | getLogger: function () {··· return this._logger; }, |
| Function (anonymous_725) | |
|---|---|
| ✗ Was not called | setLogger: function (logger) {··· this._logger = logger; }, |
| Function (anonymous_726) | |
|---|---|
| ✗ Was not called | getRootDir: function () {··· return this._root; }, |
| Function (anonymous_727) | |
|---|---|
| ✗ Was not called | getDir: function () {··· return this._dirname; }, |
| Function (anonymous_728) | |
|---|---|
| ✗ Was not called | getPath: function () {··· return this._path; }, |
| Function (anonymous_729) | |
|---|---|
| ✗ Was not called | getTechs: function () {··· throw new Error('Method `getTechs` is not implemented.'); }, |
| Function (anonymous_730) | |
|---|---|
| ✗ Was not called | setTechs: function () {··· throw new Error('Method `setTechs` is not implemented.'); }, |
| Function (anonymous_731) | |
|---|---|
| ✗ Was not called | setTargetsToBuild: function () {··· throw new Error('Method `setTargetsToBuild` is not implemented.'); }, |
| Function (anonymous_732) | |
|---|---|
| ✗ Was not called | setTargetsToClean: function () {··· throw new Error('Method `setTargetsToClean` is not implemented.'); }, |
| Function (anonymous_733) | |
|---|---|
| ✗ Was not called | setBuildGraph: function () {··· throw new Error('Method `setBuildGraph` is not implemented.'); }, |
| Function (anonymous_734) | |
|---|---|
| ✗ Was not called | resolvePath: function (filename) {··· return this._dirname + '/' + filename; }, |
| Function (anonymous_735) | |
|---|---|
| ✗ Was not called | resolveNodePath: function (nodePath, filename) {··· return this._root + '/' + nodePath + '/' + filename; }, |
| Function (anonymous_736) | |
|---|---|
| ✗ Was not called | unmaskNodeTargetName: function (nodePath, targetName) {··· return targetName.replace(/\?/g, path.basename(nodePath)); }, |
| Function (anonymous_737) | |
|---|---|
| ✗ Was not called | relativePath: function (filename) {··· var res = path.relative(path.join(this._root, this._path), filename); if (res.charAt(0) !== '.') { res = './' + res; } return res; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (res.charAt(0) !== '.') {··· res = './' + res; } |
| ✗ Negative was not executed (else) | }··· return res; |
| Function (anonymous_738) | |
|---|---|
| ✗ Was not called | unmaskTargetName: function (targetName) {··· return targetName.replace(/\?/g, this._targetName); }, |
| Function (anonymous_739) | |
|---|---|
| ✗ Was not called | getTargetName: function (suffix) {··· return this._targetName + (suffix ? '.' + suffix : ''); }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return this._targetName + (suffix ? '.' + suffix : ''); |
| ✗ Negative was not returned (: ...) | return this._targetName + (suffix ? '.' + suffix : ''); |
| Function (anonymous_740) | |
|---|---|
| ✗ Was not called | wwwRootPath: function (filename, wwwRoot) {··· wwwRoot = wwwRoot || '/'; return wwwRoot + path.relative(this._root, filename); }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | wwwRoot = wwwRoot || '/'; |
| ✗ Was not returned | wwwRoot = wwwRoot || '/'; |
| Function (anonymous_741) | |
|---|---|
| ✗ Was not called | cleanTargetFile: function () {··· throw new Error('Method `cleanTargetFile` is not implemented.'); }, |
| Function (anonymous_742) | |
|---|---|
| ✗ Was not called | createTmpFileForTarget: function () {··· throw new Error('Method `createTmpFileForTarget` is not implemented.'); }, |
| Function (anonymous_743) | |
|---|---|
| ✗ Was not called | loadTechs: function () {··· throw new Error('Method `loadTechs` is not implemented.'); }, |
| Function (anonymous_744) | |
|---|---|
| ✗ Was not called | hasRegisteredTarget: function () {··· throw new Error('Method `hasRegisteredTarget` is not implemented.'); }, |
| Function (anonymous_745) | |
|---|---|
| ✗ Was not called | resolveTarget: function (target, value) {··· this._resultTechData[target] = value; this._buildPromise.fulfill(value); this._buildPromises.push(vow.resolve(value)); }, |
| Function (anonymous_746) | |
|---|---|
| ✗ Was not called | isValidTarget: function (targetName) {··· this._logger.isValid(targetName); }, |
| Function (anonymous_747) | |
|---|---|
| ✗ Was not called | rejectTarget: function (targetName, error) {··· this._buildPromise.reject(error); }, |
| Function (anonymous_748) | |
|---|---|
| ✗ Was not called | requireNodeSources: function (sourcesByNodes) {··· var resultByNodes = {}; Object.keys(sourcesByNodes).forEach(function (nodePath) { resultByNodes[nodePath] = sourcesByNodes[nodePath].map(function (target) { var node = this._nodeTechData[nodePath]; return node && node[target]; }, this); }, this); return vow.fulfill(resultByNodes); }, |
| Function (anonymous_749) | |
|---|---|
| ✗ Was not called | Object.keys(sourcesByNodes).forEach(function (nodePath) {··· resultByNodes[nodePath] = sourcesByNodes[nodePath].map(function (target) { var node = this._nodeTechData[nodePath]; return node && node[target]; }, this); }, this); |
| Function (anonymous_750) | |
|---|---|
| ✗ Was not called | resultByNodes[nodePath] = sourcesByNodes[nodePath].map(function (target) {··· var node = this._nodeTechData[nodePath]; return node && node[target]; }, this); |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | return node && node[target]; |
| ✗ Was not returned | return node && node[target]; |
| Function (anonymous_751) | |
|---|---|
| ✗ Was not called | requireSources: function (sources) {··· return vow.all(sources.map(function (source) { return vow.fulfill(this._techData[source]); }, this)); }, |
| Function (anonymous_752) | |
|---|---|
| ✗ Was not called | return vow.all(sources.map(function (source) {··· return vow.fulfill(this._techData[source]); }, this)); |
| Function (anonymous_753) | |
|---|---|
| ✗ Was not called | cleanTargets: function () {··· throw new Error('Method `cleanTargets` is not implemented.'); }, |
| Function (anonymous_754) | |
|---|---|
| ✗ Was not called | build: function () {··· throw new Error('Method `build` is not implemented.'); }, |
| Function (anonymous_755) | |
|---|---|
| ✗ Was not called | clean: function () {··· throw new Error('Method `clean` is not implemented.'); }, |
| Function (anonymous_756) | |
|---|---|
| ✗ Was not called | getNodeCache: function (subCacheName) {··· return subCacheName ? this._nodeCache.subCache(subCacheName) : this._nodeCache; }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | return subCacheName ? this._nodeCache.subCache(subCacheName) : this._nodeCache; |
| ✗ Negative was not returned (: ...) | return subCacheName ? this._nodeCache.subCache(subCacheName) : this._nodeCache; |
| Function (anonymous_757) | |
|---|---|
| ✗ Was not called | getLevelNamingScheme: function (levelPath) {··· return this._levelNamingSchemes[levelPath]; }, |
| Function (anonymous_758) | |
|---|---|
| ✗ Was not called | destruct: function () {··· throw new Error('Method `destruct` is not implemented.'); }, |
| Function (anonymous_759) | |
|---|---|
| ✗ Was not called | provideTechData: function (targetName, value) {··· targetName = this.unmaskTargetName(targetName); this._techData[targetName] = value; }, |
| Function (anonymous_760) | |
|---|---|
| ✗ Was not called | provideNodeTechData: function (node, targetName, value) {··· targetName = this.unmaskTargetName(targetName); if (!this._nodeTechData[node]) { this._nodeTechData[node] = {}; } this._nodeTechData[node][targetName] = value; }, |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (!this._nodeTechData[node]) {··· this._nodeTechData[node] = {}; } |
| ✗ Negative was not executed (else) | }··· this._nodeTechData[node][targetName] = value; |
| Function (anonymous_761) | |
|---|---|
| ✗ Was not called | provideLevelNamingScheme: function (level, schemeBuilder) {··· var levels = Array.isArray(level) ? level : [level]; var _this = this; levels.forEach(function (levelPath) { if (levelPath.charAt(0) !== '/') { levelPath = _this.resolvePath(levelPath); } _this._levelNamingSchemes[levelPath] = schemeBuilder; }); return this; }, |
| Branch ConditionalExpression | |
|---|---|
| ✗ Positive was not returned (? ...) | var levels = Array.isArray(level) ? level : [level]; |
| ✗ Negative was not returned (: ...) | var levels = Array.isArray(level) ? level : [level]; |
| Function (anonymous_762) | |
|---|---|
| ✗ Was not called | levels.forEach(function (levelPath) {··· if (levelPath.charAt(0) !== '/') { levelPath = _this.resolvePath(levelPath); } _this._levelNamingSchemes[levelPath] = schemeBuilder; }); |
| Branch IfStatement | |
|---|---|
| ✗ Positive was not executed (if) | if (levelPath.charAt(0) !== '/') {··· levelPath = _this.resolvePath(levelPath); } |
| ✗ Negative was not executed (else) | }··· _this._levelNamingSchemes[levelPath] = schemeBuilder; |
| Function (anonymous_763) | |
|---|---|
| ✗ Was not called | runTech: function (TechClass, options) {··· options = options || {}; var tech = new TechClass(options); tech.init(this); return vow.fulfill().then(function () { return vow.when(tech.build()).then(function () { return this._buildPromise; }.bind(this)); }.bind(this)); }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | options = options || {}; |
| ✗ Was not returned | options = options || {}; |
| Function (anonymous_764) | |
|---|---|
| ✗ Was not called | return vow.fulfill().then(function () {··· return vow.when(tech.build()).then(function () { return this._buildPromise; }.bind(this)); }.bind(this)); |
| Function (anonymous_765) | |
|---|---|
| ✗ Was not called | return vow.when(tech.build()).then(function () {··· return this._buildPromise; }.bind(this)); |
| Function (anonymous_766) | |
|---|---|
| ✗ Was not called | runTechAndGetResults: function (TechClass, options) {··· options = options || {}; var tech = new TechClass(options); tech.init(this); return vow.fulfill().then(function () { return vow.when(tech.build()).then(function () { return vow.all(this._buildPromises).then(function () { var resultByTargets = {}; tech.getTargets().forEach(function (targetName) { resultByTargets[targetName] = this._resultTechData[targetName]; }, this); return resultByTargets; }.bind(this)); }.bind(this)); }.bind(this)); }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | options = options || {}; |
| ✗ Was not returned | options = options || {}; |
| Function (anonymous_767) | |
|---|---|
| ✗ Was not called | return vow.fulfill().then(function () {··· return vow.when(tech.build()).then(function () { return vow.all(this._buildPromises).then(function () { var resultByTargets = {}; tech.getTargets().forEach(function (targetName) { resultByTargets[targetName] = this._resultTechData[targetName]; }, this); return resultByTargets; }.bind(this)); }.bind(this)); }.bind(this)); |
| Function (anonymous_768) | |
|---|---|
| ✗ Was not called | return vow.when(tech.build()).then(function () {··· return vow.all(this._buildPromises).then(function () { var resultByTargets = {}; tech.getTargets().forEach(function (targetName) { resultByTargets[targetName] = this._resultTechData[targetName]; }, this); return resultByTargets; }.bind(this)); }.bind(this)); |
| Function (anonymous_769) | |
|---|---|
| ✗ Was not called | return vow.all(this._buildPromises).then(function () {··· var resultByTargets = {}; tech.getTargets().forEach(function (targetName) { resultByTargets[targetName] = this._resultTechData[targetName]; }, this); return resultByTargets; }.bind(this)); |
| Function (anonymous_770) | |
|---|---|
| ✗ Was not called | tech.getTargets().forEach(function (targetName) {··· resultByTargets[targetName] = this._resultTechData[targetName]; }, this); |
| Function (anonymous_771) | |
|---|---|
| ✗ Was not called | runTechAndGetContent: function (TechClass, options) {··· options = options || {}; var node = this; var tech = new TechClass(options); tech.init(this); return vow.fulfill().then(function () { return vow.when(tech.build()).then(function () { return this._buildPromise.then(function () { return vow.all(tech.getTargets().map(function (targetName) { return asyncFs.read(node.resolvePath(targetName)); }, this)); }.bind(this)); }.bind(this)); }.bind(this)); }, |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | options = options || {}; |
| ✗ Was not returned | options = options || {}; |
| Function (anonymous_772) | |
|---|---|
| ✗ Was not called | return vow.fulfill().then(function () {··· return vow.when(tech.build()).then(function () { return this._buildPromise.then(function () { return vow.all(tech.getTargets().map(function (targetName) { return asyncFs.read(node.resolvePath(targetName)); }, this)); }.bind(this)); }.bind(this)); }.bind(this)); |
| Function (anonymous_773) | |
|---|---|
| ✗ Was not called | return vow.when(tech.build()).then(function () {··· return this._buildPromise.then(function () { return vow.all(tech.getTargets().map(function (targetName) { return asyncFs.read(node.resolvePath(targetName)); }, this)); }.bind(this)); }.bind(this)); |
| Function (anonymous_774) | |
|---|---|
| ✗ Was not called | return this._buildPromise.then(function () {··· return vow.all(tech.getTargets().map(function (targetName) { return asyncFs.read(node.resolvePath(targetName)); }, this)); }.bind(this)); |
| Function (anonymous_775) | |
|---|---|
| ✗ Was not called | return vow.all(tech.getTargets().map(function (targetName) {··· return asyncFs.read(node.resolvePath(targetName)); }, this)); |
| Function (anonymous_776) | |
|---|---|
| ✗ Was not called | runTechAndRequire: function (TechClass, options) {··· options = options || {}; var node = this; var tech = new TechClass(options); tech.init(this); return vow.fulfill().then(function () { return vow.when(tech.build()).then(function () { return this._buildPromise.then(function () { return vow.all(tech.getTargets().map(function (targetName) { var filename = node.resolvePath(targetName); dropRequireCache(require, filename); return require(filename); }, this)); }.bind(this)); }.bind(this)); }.bind(this)); } |
| Branch LogicalExpression | |
|---|---|
| ✗ Was not returned | options = options || {}; |
| ✗ Was not returned | options = options || {}; |
| Function (anonymous_777) | |
|---|---|
| ✗ Was not called | return vow.fulfill().then(function () {··· return vow.when(tech.build()).then(function () { return this._buildPromise.then(function () { return vow.all(tech.getTargets().map(function (targetName) { var filename = node.resolvePath(targetName); dropRequireCache(require, filename); return require(filename); }, this)); }.bind(this)); }.bind(this)); }.bind(this)); |
| Function (anonymous_778) | |
|---|---|
| ✗ Was not called | return vow.when(tech.build()).then(function () {··· return this._buildPromise.then(function () { return vow.all(tech.getTargets().map(function (targetName) { var filename = node.resolvePath(targetName); dropRequireCache(require, filename); return require(filename); }, this)); }.bind(this)); }.bind(this)); |
| Function (anonymous_779) | |
|---|---|
| ✗ Was not called | return this._buildPromise.then(function () {··· return vow.all(tech.getTargets().map(function (targetName) { var filename = node.resolvePath(targetName); dropRequireCache(require, filename); return require(filename); }, this)); }.bind(this)); |
| Function (anonymous_780) | |
|---|---|
| ✗ Was not called | return vow.all(tech.getTargets().map(function (targetName) {··· var filename = node.resolvePath(targetName); dropRequireCache(require, filename); return require(filename); }, this)); |